mirror of https://github.com/apache/maven.git
[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:
parent
19dec1eff6
commit
54be625048
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue