Fix: MNG-3965

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@736386 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-01-21 19:31:48 +00:00
parent 01e602351c
commit 15f10579d7
2 changed files with 15 additions and 1 deletions

View File

@ -484,6 +484,19 @@ public class PomTransformer
}
}
//Remove Default Executions IDS (mng-3965)
List<ModelProperty> replace = new ArrayList<ModelProperty>();
for(ModelProperty mp : tmp)
{
if(mp.getUri().equals(ProjectUri.Build.Plugins.Plugin.Executions.Execution.id)
&& mp.getResolvedValue() != null && mp.getResolvedValue().equals("default-execution-id")) {
replace.add(mp);
}
}
tmp.removeAll(replace);
//Missing Version Rule
if ( getPropertyFor( ProjectUri.version, tmp ) == null )
{

View File

@ -114,11 +114,12 @@ public class PomConstructionTest
assertEquals( 3, ( (List<?>) pom.getValue( "repositories" ) ).size() );
}
/** MNG-3985
/** MNG-3965 */
public void testMultipleExecutionIds()
throws Exception
{
PomTestWrapper pom = buildPom( "dual-execution-ids/sub" );
// System.out.println(pom.getDomainModel().asString());
assertEquals( 1, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
}
//*/