PropertiesMojo.execute() at line 114-118:
for (Artifact artifact : artifacts) {
project.getProperties()
.setProperty(
artifact.getDependencyConflictId(),
artifact.getFile().getAbsolutePath()); // NPE if null
}
project.getArtifacts() can include artifacts where getFile() returns null (e.g., unresolved optional dependencies, artifacts with resolution failures that don't fully fail the build). Calling .getAbsolutePath() on null throws NPE and fails the build.
The extra artifact resolution at lines 129-136 has a similar issue:
artifact = resolverUtil.resolveArtifact(artifact, project.getRemoteProjectRepositories());
this.project.getProperties().setProperty(toConflictId(artifact), artifact.getFile().getAbsolutePath());
If resolution succeeds but returns a null file, this also NPEs.
PropertiesMojo.execute()at line 114-118:project.getArtifacts()can include artifacts wheregetFile()returnsnull(e.g., unresolved optional dependencies, artifacts with resolution failures that don't fully fail the build). Calling.getAbsolutePath()on null throws NPE and fails the build.The extra artifact resolution at lines 129-136 has a similar issue:
If resolution succeeds but returns a null file, this also NPEs.