AlexanderAshitkin commented on code in PR #178: URL: https://github.com/apache/maven-build-cache-extension/pull/178#discussion_r1732866172
########## src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java: ########## @@ -892,6 +892,18 @@ private void restoreGeneratedSources(Artifact artifact, Path artifactFilePath, M Files.createDirectories(outputDir); } CacheUtils.unzip(artifactFilePath, outputDir); + OutputType outputType = OutputType.fromClassifier(artifact.getClassifier()); + if (outputType != OutputType.GENERATED_SOURCE) { + return; + } + Path targetDir = Paths.get(project.getBuild().getDirectory()); + if (outputDir.equals(targetDir.resolve("generated-sources")) Review Comment: Could you please explain why we need to attach the sources to the project? The cache should not affect the build; it should only restore dependencies. If the build doesn't require these source roots, it doesn't seem correct to attach them. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org