in src/main/java/org/apache/maven/plugins/artifact/buildinfo/AbstractBuildinfoMojo.java [194:211]
protected void copyAggregateToRoot(File aggregate) throws MojoExecutionException {
if (reactorProjects.size() == 1) {
// mono-module, no aggregate file to deal with
return;
}
// copy aggregate file to root target directory
MavenProject root = getExecutionRoot();
String extension = aggregate.getName().substring(aggregate.getName().lastIndexOf('.'));
File rootCopy =
new File(root.getBuild().getDirectory(), root.getArtifactId() + '-' + root.getVersion() + extension);
try {
FileUtils.copyFile(aggregate, rootCopy);
getLog().info("Aggregate " + extension.substring(1) + " copied to " + rootCopy);
} catch (IOException ioe) {
throw new MojoExecutionException("Could not copy " + aggregate + "to " + rootCopy);
}
}