private static String getDependencyId()

in src/main/java/org/apache/maven/plugins/dependency/utils/DependencyUtil.java [180:204]


    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 (artifact.getClassifier() != null && !artifact.getClassifier().isEmpty()) {
            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();
    }