mirror of https://github.com/apache/maven.git
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:
parent
01e602351c
commit
15f10579d7
|
@ -483,6 +483,19 @@ public class PomTransformer
|
|||
tmp.add(tmp.indexOf(mc.getProperties().get(0)) + 1, new ModelProperty(ProjectUri.Dependencies.Dependency.scope, "compile"));
|
||||
}
|
||||
}
|
||||
|
||||
//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 )
|
||||
|
|
|
@ -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() );
|
||||
}
|
||||
//*/
|
||||
|
|
Loading…
Reference in New Issue