in src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildInfoWriter.java [207:227]
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.getType())) {
// 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 " + artifact.getId() + " points to a directory: " + artifactFile
+ ". Packaging should be 'pom'?");
}
if (!artifactFile.isFile()) {
log.warn("Ignoring artifact " + artifact.getId() + " because it points to inexistent " + artifactFile);
return;
}
printFile(prefix, artifact.getGroupId(), artifact.getFile(), getArtifactFilename(artifact));
artifacts.put(artifact, prefix);
}