in src/main/java/org/apache/maven/plugins/dependency/utils/DependencyUtil.java [178:202]
private static String getDependencyId(Artifact artifact, boolean removeVersion, boolean removeType) {
StringBuilder sb = new StringBuilder();
sb.append(artifact.getArtifactId());
if (!removeVersion) {
sb.append("-");
sb.append(artifact.getVersion());
}
if (StringUtils.isNotEmpty(artifact.getClassifier())) {
sb.append("-");
sb.append(artifact.getClassifier());
}
// if the classifier and type are the same (sources), then don't
// repeat.
// avoids names like foo-sources-sources
if (!removeType && !Objects.equals(artifact.getClassifier(), artifact.getType())) {
sb.append("-");
sb.append(artifact.getType());
}
return sb.toString();
}