in src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildInfoWriter.java [238:259]
private void printArtifact(String prefix, int i, Artifact artifact) throws MojoExecutionException {
prefix = prefix + i;
File artifactFile = artifact.getFile();
if (artifactFile.isDirectory()) {
if ("pom".equals(artifact.getExtension())) {
// ignore .pom files: they should not be treated as Artifacts
return;
}
// edge case found in a distribution module with default packaging and skip set for
// m-jar-p: should use pom packaging instead
throw new MojoExecutionException("Artifact " + ArtifactIdUtils.toId(artifact) + " points to a directory: "
+ artifactFile + ". Packaging should be 'pom'?");
}
if (!artifactFile.isFile()) {
log.warn("Ignoring artifact " + ArtifactIdUtils.toId(artifact) + " because it points to inexistent "
+ artifactFile);
return;
}
printFile(prefix, artifact.getGroupId(), artifact.getFile(), getArtifactFilename(artifact));
artifacts.put(artifact, prefix);
}