[MNG-4771] [regression] Plugin prefix resolution ignores enabled flags on repository

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@987570 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-08-20 16:53:39 +00:00
parent 19dec1eff6
commit 54be625048
1 changed files with 11 additions and 0 deletions

View File

@ -180,6 +180,12 @@ public class DefaultPluginPrefixResolver
{
for ( ArtifactRepository repository : request.getRemoteRepositories() )
{
if ( !isEnabled( repository ) )
{
logger.debug( "Skipped plugin prefix lookup from disabled repository " + repository.getId() );
continue;
}
String localPath = getLocalMetadataPath( pluginGroup, repository );
File groupMetadataFile = new File( localRepository.getBasedir(), localPath );
@ -286,6 +292,11 @@ public class DefaultPluginPrefixResolver
return null;
}
private boolean isEnabled( ArtifactRepository repository )
{
return repository.getReleases().isEnabled() || repository.getSnapshots().isEnabled();
}
private PluginPrefixResult resolveFromRepository( PluginPrefixRequest request, String pluginGroup,
File metadataFile, ArtifactRepository repository )
{