mirror of https://github.com/apache/maven.git
Removed hard-coding of plugins. Plugins come into builder with default configs. Need to null these out so that pluginMng will be applied.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@769453 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
850b047c6d
commit
cb51cfc270
|
@ -268,8 +268,8 @@ public class ProcessorContext
|
|||
public static void addPluginsToModel(Model target, Set<Plugin> plugins)
|
||||
{
|
||||
Build build = target.getBuild();
|
||||
addPlugin(build, "maven-compiler-plugin");
|
||||
addPlugin(build, "maven-resources-plugin");
|
||||
// addPlugin(build, "maven-compiler-plugin");
|
||||
// addPlugin(build, "maven-resources-plugin");
|
||||
//addPlugin(build, "maven-deploy-plugin");
|
||||
//addPlugin(build, "maven-jar-plugin");
|
||||
// addPlugin(build, "maven-surefire-plugin");
|
||||
|
@ -283,7 +283,7 @@ public class ProcessorContext
|
|||
[java] PLUGIN: org.apache.maven.plugins:maven-resources-plugin
|
||||
[java] PLUGIN: org.apache.maven.plugins:maven-surefire-plugin
|
||||
[java] PLUGIN: org.apache.maven.plugins:maven-deploy-plugin
|
||||
/*
|
||||
*/
|
||||
List<Plugin> mPlugins = target.getBuild().getPlugins();
|
||||
|
||||
List<Plugin> lifecyclePlugins = new ArrayList<Plugin>();
|
||||
|
@ -292,13 +292,14 @@ public class ProcessorContext
|
|||
{
|
||||
if( !containsPlugin( p, mPlugins) )
|
||||
{
|
||||
p.setConfiguration(null);
|
||||
lifecyclePlugins.add(p);
|
||||
System.out.println("PLUGIN: " + p.getKey());
|
||||
//System.out.println("PLUGIN: " + p.getKey() +":" + ((p.getConfiguration() != null) ? p.getConfiguration().toString() : "") );
|
||||
}
|
||||
}
|
||||
|
||||
target.getBuild().getPlugins().addAll(lifecyclePlugins);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
private static boolean containsPlugin(Plugin plugin, List<Plugin> plugins)
|
||||
|
|
Loading…
Reference in New Issue