maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1060318 - /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/ReactorReader.java
Date Tue, 18 Jan 2011 11:27:23 GMT
Author: brett
Date: Tue Jan 18 11:27:22 2011
New Revision: 1060318

URL: http://svn.apache.org/viewvc?rev=1060318&view=rev
Log:
use ArtifactUtils to create IDs to avoid duplicate construction code
Submitted by: Stanislav Ochotnicky

Modified:
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/ReactorReader.java

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/ReactorReader.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/ReactorReader.java?rev=1060318&r1=1060317&r2=1060318&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/ReactorReader.java (original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/ReactorReader.java Tue Jan
18 11:27:22 2011
@@ -216,7 +216,7 @@ class ReactorReader
 
     public File findArtifact( Artifact artifact )
     {
-        String projectKey = artifact.getGroupId() + ':' + artifact.getArtifactId() + ':'
+ artifact.getVersion();
+        String projectKey = ArtifactUtils.key( artifact.getGroupId(), artifact.getArtifactId(),
artifact.getVersion() );
 
         MavenProject project = projectsByGAV.get( projectKey );
 
@@ -230,7 +230,7 @@ class ReactorReader
 
     public List<String> findVersions( Artifact artifact )
     {
-        String key = artifact.getGroupId() + ':' + artifact.getArtifactId();
+        String key = ArtifactUtils.versionlessKey( artifact.getGroupId(), artifact.getArtifactId()
);
 
         List<MavenProject> projects = projectsByGA.get( key );
         if ( projects == null || projects.isEmpty() )



Mime
View raw message