gnodet commented on code in PR #1105: URL: https://github.com/apache/maven/pull/1105#discussion_r1200930937
########## maven-core/src/main/java/org/apache/maven/internal/transformation/ConsumerPomArtifactTransformer.java: ########## @@ -77,13 +80,34 @@ public void injectTransformedArtifacts(MavenProject project, RepositorySystemSes Files.createDirectories(buildDir); generatedFile = Files.createTempFile(buildDir, CONSUMER_POM_CLASSIFIER, "pom"); } + + removeOldConsumerPomFiles(generatedFile); Review Comment: > > @Giovds have a look at [gnodet@11009e9](https://github.com/gnodet/maven/commit/11009e9f6921657e31384bd9838d5ab1edb1aacc), could you double check that it works for you ? > > Cool, TIL! Just verified it and it does work for me. The files are cleaned up. > > Do note that the final result means there will be no consumer*pom file in the build dir whatsoever. I don't know if it was kept for a reason. Perhaps the file is/will be (re)used for build-consumer features beyond a single run? If it's not and it's a temp file, why not always use the temp dir e.g.? > > * Without to much research: * Seems like (in this class at least) the `CONSUMER_POM_CLASSIFIER` is private so not used by other classes and the build dir is never queried for the file, only in-memory artifact lists? Yes, I think it was written to disk because it was needed as a file and there was no easy way to delete it at the end of the process, but they're not supposed to outlive the session. -- 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