o Improved effeciency of cache

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1004602 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-10-05 10:25:25 +00:00
parent 1fd91671ee
commit e7bc1a9975
1 changed files with 3 additions and 1 deletions

View File

@ -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();