in src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java [156:197]
protected List<ArtifactItem> getProcessedArtifactItems(ProcessArtifactItemsRequest processArtifactItemsRequest)
throws MojoExecutionException {
boolean removeVersion = processArtifactItemsRequest.isRemoveVersion(),
prependGroupId = processArtifactItemsRequest.isPrependGroupId(),
useBaseVersion = processArtifactItemsRequest.isUseBaseVersion();
boolean removeClassifier = processArtifactItemsRequest.isRemoveClassifier();
if (artifactItems == null || artifactItems.isEmpty()) {
throw new MojoExecutionException("There are no artifactItems configured.");
}
for (ArtifactItem artifactItem : artifactItems) {
this.getLog().info("Configured Artifact: " + artifactItem.toString());
if (artifactItem.getOutputDirectory() == null) {
artifactItem.setOutputDirectory(this.outputDirectory);
}
artifactItem.getOutputDirectory().mkdirs();
// make sure we have a version.
if (artifactItem.getVersion() == null || artifactItem.getVersion().isEmpty()) {
fillMissingArtifactVersion(artifactItem);
}
artifactItem.setArtifact(this.getArtifact(artifactItem));
if (artifactItem.getDestFileName() == null
|| artifactItem.getDestFileName().isEmpty()) {
artifactItem.setDestFileName(DependencyUtil.getFormattedFileName(
artifactItem.getArtifact(), removeVersion, prependGroupId, useBaseVersion, removeClassifier));
}
try {
artifactItem.setNeedsProcessing(checkIfProcessingNeeded(artifactItem));
} catch (ArtifactFilterException e) {
throw new MojoExecutionException(e.getMessage(), e);
}
}
return artifactItems;
}