PR: MNG-1041

conflict id should include classifier


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@293226 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-10-03 03:52:30 +00:00
parent cc96c2bc38
commit 4ff4c02fd5
1 changed files with 4 additions and 3 deletions

View File

@ -215,12 +215,13 @@ public class DefaultArtifact
public String getId() public String getId()
{ {
return getDependencyConflictId() + ( hasClassifier() ? ":" + getClassifier() : "" ) + ":" + getBaseVersion(); return getDependencyConflictId() + ":" + getBaseVersion();
} }
public String getDependencyConflictId() public String getDependencyConflictId()
{ {
return getGroupId() + ":" + getArtifactId() + ":" + getType(); return getGroupId() + ":" + getArtifactId() + ":" + getType() +
( hasClassifier() ? ":" + getClassifier() : "" );
} }
public void addMetadata( ArtifactMetadata metadata ) public void addMetadata( ArtifactMetadata metadata )
@ -252,7 +253,7 @@ public class DefaultArtifact
public String toString() public String toString()
{ {
return getDependencyConflictId() + ( hasClassifier() ? ":" + getClassifier() : "" ) + ":" + return getDependencyConflictId() + ":" +
( version != null || baseVersion != null ? getBaseVersion() : versionRange.toString() ); ( version != null || baseVersion != null ? getBaseVersion() : versionRange.toString() );
} }