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:
Britton Isbell 2009-01-07 14:03:06 +00:00
parent e52473272d
commit f3c978e962
2 changed files with 21 additions and 4 deletions

View File

@ -232,11 +232,27 @@ public final DomainModel transformToDomainModel( List<ModelProperty> properties,
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 final DomainModel transformToDomainModel( List<ModelProperty> properties,
ModelTransformerContext.sort(a.getProperties(), ProjectUri.Build.Plugins.Plugin.Executions.xUri));
}
}
}
}
}

View File

@ -243,7 +243,7 @@ public void testOverridingOfInheritedPluginExecutionsWithoutPluginManagement()
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 void testOverridingOfInheritedPluginExecutionsWithPluginManagement()
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()