in enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/dependency/RequireUpperBoundDeps.java [180:200]
private String getFullArtifactName(DependencyNode node, boolean usePremanaged) {
Artifact artifact = ArtifactUtils.toArtifact(node);
String version = DependencyManagerUtils.getPremanagedVersion(node);
if (!usePremanaged || version == null) {
version = uniqueVersions ? artifact.getVersion() : artifact.getBaseVersion();
}
String result = artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + version;
String classifier = artifact.getClassifier();
if (classifier != null && !classifier.isEmpty()) {
result += ":" + classifier;
}
String scope = artifact.getScope();
if (scope != null && !"compile".equals(scope)) {
result += " [" + scope + ']';
}
return result;
}