in src/main/java/org/apache/maven/plugins/dependency/utils/translators/ClassifierTypeTranslator.java [59:95]
public Set<org.eclipse.aether.artifact.Artifact> translate(Set<Artifact> artifacts, Log log) {
Set<org.eclipse.aether.artifact.Artifact> results;
log.debug("Translating Artifacts using Classifier: " + this.classifier + " and Type: " + this.type);
results = new LinkedHashSet<>();
for (Artifact artifact : artifacts) {
// this translator must pass both type and classifier here so we
// will use the
// base artifact value if null comes in
final String useType;
if (this.type != null && !this.type.isEmpty()) {
useType = this.type;
} else {
useType = artifact.getType();
}
ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler(useType);
final String extension;
if (artifactHandler != null) {
extension = artifactHandler.getExtension();
} else {
extension = this.type;
}
String useClassifier;
if (this.classifier != null && !this.classifier.isEmpty()) {
useClassifier = this.classifier;
} else {
useClassifier = artifact.getClassifier();
}
results.add(new SubArtifact(RepositoryUtils.toArtifact(artifact), useClassifier, extension));
}
return results;
}