mirror of
https://github.com/apache/maven.git
synced 2025-02-07 02:29:10 +00:00
o Tweaked API to express in-situ injection of default mojo configuration values
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@773411 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f1f44eb281
commit
4e73077311
@ -647,7 +647,7 @@ private Plugin populatePluginWithInformationSpecifiedInLifecyclePhaseDefinition(
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public Set<Plugin> populateDefaultConfigurationForPlugins( Set<Plugin> plugins, MavenProject project, ArtifactRepository localRepository )
|
||||
public void populateDefaultConfigurationForPlugins( Collection<Plugin> plugins, MavenProject project, ArtifactRepository localRepository )
|
||||
throws LifecycleExecutionException
|
||||
{
|
||||
for( Plugin p : plugins )
|
||||
@ -661,8 +661,6 @@ public Set<Plugin> populateDefaultConfigurationForPlugins( Set<Plugin> plugins,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return plugins;
|
||||
}
|
||||
|
||||
public Xpp3Dom getDefaultPluginConfiguration( String groupId, String artifactId, String version, String goal, MavenProject project, ArtifactRepository localRepository )
|
||||
|
@ -19,6 +19,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@ -63,7 +64,7 @@ List<MojoExecution> calculateLifecyclePlan( String lifecyclePhase, MavenSession
|
||||
// Given a set of {@link org.apache.maven.Plugin} objects where the GAV is set we can lookup the plugin
|
||||
// descriptor and populate the default configuration.
|
||||
//
|
||||
Set<Plugin> populateDefaultConfigurationForPlugins( Set<Plugin> plugins, MavenProject project, ArtifactRepository localRepository )
|
||||
void populateDefaultConfigurationForPlugins( Collection<Plugin> plugins, MavenProject project, ArtifactRepository localRepository )
|
||||
throws LifecycleExecutionException;
|
||||
|
||||
void execute( MavenSession session )
|
||||
|
@ -176,9 +176,9 @@ public MavenProject build( File pomFile, ProjectBuilderConfiguration configurati
|
||||
// 3. POM values from per-execution configuration
|
||||
// These configuration sources are given in increasing order of dominance.
|
||||
|
||||
Set<Plugin> processedPlugins = lifecycle.populateDefaultConfigurationForPlugins( pluginsFromProject, project, configuration.getLocalRepository() );
|
||||
lifecycle.populateDefaultConfigurationForPlugins( pluginsFromProject, project, configuration.getLocalRepository() );
|
||||
|
||||
for ( Plugin buildPlugin : processedPlugins )
|
||||
for ( Plugin buildPlugin : pluginsFromProject )
|
||||
{
|
||||
Xpp3Dom dom = (Xpp3Dom) buildPlugin.getConfiguration();
|
||||
Plugin x = containsPlugin( buildPlugin, project.getModel().getBuild().getPlugins() );
|
||||
@ -205,7 +205,7 @@ public MavenProject build( File pomFile, ProjectBuilderConfiguration configurati
|
||||
}
|
||||
}
|
||||
|
||||
project.getModel().getBuild().setPlugins( new ArrayList<Plugin>( processedPlugins ) );
|
||||
project.getModel().getBuild().setPlugins( new ArrayList<Plugin>( pluginsFromProject ) );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -71,11 +72,10 @@ public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
public Set<Plugin> populateDefaultConfigurationForPlugins( Set<Plugin> plugins, MavenProject project,
|
||||
public void populateDefaultConfigurationForPlugins( Collection<Plugin> plugins, MavenProject project,
|
||||
ArtifactRepository localRepository )
|
||||
throws LifecycleExecutionException
|
||||
{
|
||||
return plugins;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user