elharo opened a new pull request, #1655:
URL: https://github.com/apache/maven-dependency-plugin/pull/1655

   `PropertiesMojo` sets project properties to artifact file paths. 
`artifact.getFile()` can return `null` for unresolved or POM-packaged 
artifacts, and calling `getAbsolutePath()` on null throws NPE with an unhelpful 
stack trace. Since `Properties.setProperty()` also throws NPE on null values, 
there is no way to represent "no file" through the property mechanism.
   
   Throw `MojoExecutionException` with a clear diagnostic message at both 
potential NPE sites instead.
   
   Includes a failing (at HEAD) unit test that verifies 
`MojoExecutionException` is thrown when an artifact has no file.
   
   fixes #1647


-- 
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