mirror of https://github.com/apache/maven.git
o Fixed precedence of plugin groups (request > settings > defaults)
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@777165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5eb52b5dee
commit
cad43e6b56
|
@ -585,6 +585,16 @@ public class DefaultMavenExecutionRequest
|
|||
return this;
|
||||
}
|
||||
|
||||
public MavenExecutionRequest addPluginGroups( List<String> pluginGroups )
|
||||
{
|
||||
for ( String pluginGroup : pluginGroups )
|
||||
{
|
||||
addPluginGroup( pluginGroup );
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isUsePluginUpdateOverride()
|
||||
{
|
||||
return usePluginUpdateOverride;
|
||||
|
|
|
@ -23,11 +23,9 @@ import java.io.File;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
|
||||
import org.apache.maven.model.Plugin;
|
||||
import org.apache.maven.model.Profile;
|
||||
import org.apache.maven.project.ProjectBuilderConfiguration;
|
||||
import org.apache.maven.settings.Settings;
|
||||
|
@ -171,6 +169,7 @@ public interface MavenExecutionRequest
|
|||
List<String> getPluginGroups();
|
||||
MavenExecutionRequest setPluginGroups( List<String> pluginGroups );
|
||||
MavenExecutionRequest addPluginGroup( String pluginGroup );
|
||||
MavenExecutionRequest addPluginGroups( List<String> pluginGroups );
|
||||
|
||||
boolean isUsePluginUpdateOverride();
|
||||
MavenExecutionRequest setUsePluginUpdateOverride( boolean usePluginUpdateOverride );
|
||||
|
|
|
@ -16,7 +16,6 @@ package org.apache.maven.embedder.execution;
|
|||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -58,8 +57,6 @@ public class DefaultMavenExecutionRequestPopulator
|
|||
{
|
||||
pom( request, configuration );
|
||||
|
||||
populateDefaultPluginGroups( request, configuration );
|
||||
|
||||
settings( request, configuration );
|
||||
|
||||
localRepository( request, configuration );
|
||||
|
@ -105,10 +102,8 @@ public class DefaultMavenExecutionRequestPopulator
|
|||
|
||||
private void populateDefaultPluginGroups( MavenExecutionRequest request, Configuration configuration )
|
||||
{
|
||||
List<String> pluginGroups = new ArrayList<String>();
|
||||
pluginGroups.add( "org.apache.maven.plugins" );
|
||||
pluginGroups.add( "org.codehaus.mojo" );
|
||||
request.setPluginGroups( pluginGroups );
|
||||
request.addPluginGroup( "org.apache.maven.plugins" );
|
||||
request.addPluginGroup( "org.codehaus.mojo" );
|
||||
}
|
||||
|
||||
// Process plugin groups
|
||||
|
@ -119,7 +114,9 @@ public class DefaultMavenExecutionRequestPopulator
|
|||
{
|
||||
Settings settings = request.getSettings();
|
||||
|
||||
request.getPluginGroups().addAll( settings.getPluginGroups() );
|
||||
request.addPluginGroups( settings.getPluginGroups() );
|
||||
|
||||
populateDefaultPluginGroups( request, configuration );
|
||||
|
||||
List<org.apache.maven.settings.Profile> settingsProfiles = settings.getProfiles();
|
||||
|
||||
|
|
Loading…
Reference in New Issue