elharo opened a new pull request, #377: URL: https://github.com/apache/maven-antrun-plugin/pull/377
## Fixes https://github.com/apache/maven-antrun-plugin/issues/372 ## Summary `AntRunMojo.copyProperties` called `artifact.getFile().getPath()` without a null check, throwing an NPE when a project dependency has no resolved artifact file (e.g. a dependency that failed to resolve or a project-level dependency in a reactor build). Such dependencies are now skipped with a warning instead of failing the build, matching the expected behavior described in the issue (and mirroring the existing null handling in `getPathFromArtifacts`). ## Changes - `AntRunMojo.java`: null-check the artifact file in `copyProperties`; if missing, log a warning and skip that property. - New unit test `AntRunMojoCopyPropertiesTest` reproducing the NPE (fails on master, passes with the fix). ## Verification - New test fails on unpatched master with the reported NPE (`NullPointerException: Cannot invoke "java.io.File.getPath()"`), passes with the fix. - `mvn verify` (rat, checkstyle, spotless, unit tests, javadoc) passes. - `mvn verify -Prun-its` passes: all 29 integration tests succeed. -- 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]
