mirror of https://github.com/apache/maven.git
Plugin was picking up default plugin groupId, which was causing resolve of plugins to fail.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@770433 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
12ffdd1277
commit
383a8b006a
|
@ -91,7 +91,7 @@ public class DefaultMaven
|
|||
MavenExecutionResult result = new DefaultMavenExecutionResult();
|
||||
|
||||
MavenSession session = createMavenSession( request, result );
|
||||
|
||||
|
||||
if ( session.getReactorManager().hasMultipleProjects() )
|
||||
{
|
||||
//logger.info( "Reactor build order: " );
|
||||
|
|
|
@ -182,7 +182,7 @@ public class DefaultMavenProjectBuilder
|
|||
ProcessorContext.processManagementNodes(model);
|
||||
|
||||
project = this.fromDomainModelToMavenProject(model, domainModel.getParentFile(), configuration, pomFile);
|
||||
|
||||
|
||||
ArrayList<Plugin> pln = new ArrayList<Plugin>();
|
||||
for(Plugin p : project.getModel().getBuild().getPlugins())
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ public class DefaultMavenProjectBuilder
|
|||
PluginProcessor.copy2(p, copy, true);
|
||||
pln.add(copy);
|
||||
}
|
||||
|
||||
|
||||
Set<Plugin> pl = lifecycle.populateDefaultConfigurationForPlugins(new HashSet<Plugin>(pln),
|
||||
project, configuration.getLocalRepository());
|
||||
/*
|
||||
|
@ -225,6 +225,7 @@ public class DefaultMavenProjectBuilder
|
|||
|
||||
}
|
||||
project.getModel().getBuild().setPlugins(new ArrayList<Plugin>(pl));
|
||||
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
@ -252,7 +253,15 @@ public class DefaultMavenProjectBuilder
|
|||
return project;
|
||||
}
|
||||
|
||||
|
||||
private static void printPlugin(Plugin plugin, String tag)
|
||||
{
|
||||
System.out.println(tag + ":" + plugin);
|
||||
System.out.println("CONFIG:" + plugin.getConfiguration());
|
||||
for(PluginExecution pe : plugin.getExecutions())
|
||||
{
|
||||
System.out.println("PE:" + pe.getConfiguration());
|
||||
}
|
||||
}
|
||||
|
||||
private static PluginExecution contains(String goal, List<PluginExecution> plugins)
|
||||
{
|
||||
|
|
|
@ -188,7 +188,7 @@ public class PluginProcessor
|
|||
target.setArtifactId( source.getArtifactId() );
|
||||
}
|
||||
|
||||
if(target.getGroupId() == null)
|
||||
if(target.getGroupId() == null || !source.getGroupId().equals("org.apache.maven.plugins"))
|
||||
{
|
||||
target.setGroupId( source.getGroupId() );
|
||||
}
|
||||
|
@ -352,9 +352,10 @@ public class PluginProcessor
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
target.setConfiguration( new Xpp3Dom( (Xpp3Dom) source.getConfiguration()) );
|
||||
//System.out.println("+++++++++++COPY PE+++++++++++++++++" + target.getConfiguration());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue