*/
private ArtifactMetadataSource artifactMetadataSource;
public File[] getFiles() throws MojoExecutionException {
FilterArtifacts filter = buildFilter();
Set baseArtifacts = null;
if(excludeOrphanTransitive) {
Set dependencyArtifacts = project.getDependencyArtifacts();
try {
ArtifactResolutionResult result =
resolver.resolveTransitively(filter.filter(dependencyArtifacts),
project.getArtifact(),
remoteRepositories,
localRepository,
artifactMetadataSource);
baseArtifacts = result.getArtifacts();
} catch (ArtifactResolutionException are) {
throw new MojoExecutionException("Failure resolving dependencies", are);
} catch (ArtifactNotFoundException anfe) {
throw new MojoExecutionException("Failure to locate artifact", anfe);
} catch (ArtifactFilterException afe) {
throw new MojoExecutionException("Failture filtering artifacts", afe);
}
} else {
baseArtifacts = project.getArtifacts();
}
try {
Set artifacts = filter.filter(baseArtifacts);
File[] files = new File[artifacts.size()];
Iterator a = artifacts.iterator();
for(int i = 0; a.hasNext(); i++) {
files[i] = ((Artifact) a.next()).getFile();