mirror of https://github.com/apache/maven.git
Fix: MNG-3938
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@732344 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e52473272d
commit
f3c978e962
|
@ -232,11 +232,27 @@ public class PomTransformer
|
|||
|
||||
for(ModelContainer a : managementExecutionContainers)
|
||||
{
|
||||
boolean hasId = false;
|
||||
for(ModelProperty mp : a.getProperties()) {
|
||||
if(mp.getUri().equals(ProjectUri.Build.Plugins.Plugin.Executions.Execution.id)) {
|
||||
hasId = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ModelContainer c = a;
|
||||
if(!hasId) {
|
||||
List<ModelProperty> listWithId = new ArrayList<ModelProperty>(a.getProperties());
|
||||
listWithId.add(1, new ModelProperty(ProjectUri.Build.Plugins.Plugin.Executions.Execution.id, "default"));
|
||||
c = new IdModelContainerFactory().create(listWithId);
|
||||
}
|
||||
|
||||
|
||||
for(ModelContainer b : pluginExecutionContainers)
|
||||
{
|
||||
if(b.containerAction(a).equals(ModelContainerAction.JOIN))
|
||||
if(b.containerAction(c).equals(ModelContainerAction.JOIN))
|
||||
{
|
||||
source.join(b, a);
|
||||
source.join(b, c);
|
||||
joinedExecutionContainers.add(a);
|
||||
}
|
||||
}
|
||||
|
@ -272,6 +288,7 @@ public class PomTransformer
|
|||
ModelTransformerContext.sort(a.getProperties(), ProjectUri.Build.Plugins.Plugin.Executions.xUri));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ public class PomConstructionTest
|
|||
assertEquals( "child-non-default", pom.getValue( "build/plugins[1]/executions[@id='non-default']/phase" ) );
|
||||
}
|
||||
|
||||
/* FIXME: cf. MNG-3938
|
||||
/* FIXME: cf. MNG-3938 */
|
||||
public void testOverridingOfInheritedPluginExecutionsWithPluginManagement()
|
||||
throws Exception
|
||||
{
|
||||
|
@ -252,7 +252,7 @@ public class PomConstructionTest
|
|||
assertEquals( "child-default", pom.getValue( "build/plugins[1]/executions[@id='default']/phase" ) );
|
||||
assertEquals( "child-non-default", pom.getValue( "build/plugins[1]/executions[@id='non-default']/phase" ) );
|
||||
}
|
||||
//*/
|
||||
|
||||
|
||||
/* FIXME: cf. MNG-3906
|
||||
public void testOrderOfMergedPluginDependenciesWithoutPluginManagement()
|
||||
|
|
Loading…
Reference in New Issue