arturobernalg opened a new pull request, #283:
URL: https://github.com/apache/maven-artifact-plugin/pull/283

   Fixes #245.
   
   BuildInfoWriter.printArtifacts() and DescribeBuildOutputMojo both copy a 
Maven 4 transient consumer POM attachment to a temp file in the build directory 
to compute its checksum or describe it, but never delete that copy, so every 
build with a consumer POM leaves an orphan `consumer-*.pom` file behind.
   
   In BuildInfoWriter, a copy failure also only logged a line and kept going 
with a pomArtifact that was never pointed at a real file, so the following 
printFile() call failed with a NullPointerException instead of a clear error, 
masking the original IOException.
   
   Wrapped the temp file's use in try/finally so it's always deleted once read, 
and now throw a MojoExecutionException on copy failure, matching what 
DescribeBuildOutputMojo's sibling code already did. Added 
BuildInfoWriterConsumerPomTest covering both.
   
   https://claude.ai/code/session_0153qyh22xBMN1vPfWGz3jSH
   
   ---
   
   To make clear that you license your contribution under the Apache License 
Version 2.0, January 2004, check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the Apache 
License Version 2.0, January 2004
   - [x] I hereby declare that I have filed an Apache Individual Contributor 
License Agreement


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to