maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1004602 - /maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
Date Tue, 05 Oct 2010 10:25:25 GMT
Author: bentmann
Date: Tue Oct  5 10:25:25 2010
New Revision: 1004602

URL: http://svn.apache.org/viewvc?rev=1004602&view=rev
Log:
o Improved effeciency of cache

Modified:
    maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java

Modified: maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java?rev=1004602&r1=1004601&r2=1004602&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
(original)
+++ maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
Tue Oct  5 10:25:25 2010
@@ -446,14 +446,15 @@ public class DefaultVersionResolver
             classifier = artifact.getClassifier();
             extension = artifact.getExtension();
             version = artifact.getVersion();
-            context = request.getRequestContext();
             localRepo = session.getLocalRepository().getBasedir();
             workspace = CacheUtils.getWorkspace( session );
             repositories = new ArrayList<RemoteRepository>( request.getRepositories().size()
);
+            boolean repoMan = false;
             for ( RemoteRepository repository : request.getRepositories() )
             {
                 if ( repository.isRepositoryManager() )
                 {
+                    repoMan = true;
                     repositories.addAll( repository.getMirroredRepositories() );
                 }
                 else
@@ -461,6 +462,7 @@ public class DefaultVersionResolver
                     repositories.add( repository );
                 }
             }
+            context = repoMan ? request.getRequestContext() : "";
 
             int hash = 17;
             hash = hash * 31 + groupId.hashCode();



Mime
View raw message