[MNG-3938] - Plugin executions with default id are not always merged. Had previously changed the id to default-execution-id to make default clearer. Some tests had changed this value, others had not. Brought back inline with Maven 2.x

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@758338 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-03-25 16:40:21 +00:00
parent 2ca25b29fa
commit 72c4417369
5 changed files with 9 additions and 9 deletions

View File

@ -2742,7 +2742,7 @@
<name>id</name> <name>id</name>
<version>4.0.0</version> <version>4.0.0</version>
<type>String</type> <type>String</type>
<defaultValue>default-execution-id</defaultValue> <defaultValue>default</defaultValue>
<description>The identifier of this execution for labelling the goals during the build, <description>The identifier of this execution for labelling the goals during the build,
and for matching executions to merge during inheritance.</description> and for matching executions to merge during inheritance.</description>
</field> </field>
@ -2768,7 +2768,7 @@
<version>4.0.0</version> <version>4.0.0</version>
<code> <code>
<![CDATA[ <![CDATA[
public static final String DEFAULT_EXECUTION_ID = "default-execution-id"; public static final String DEFAULT_EXECUTION_ID = "default";
]]> ]]>
</code> </code>
</codeSegment> </codeSegment>

View File

@ -472,12 +472,13 @@ public class PomConstructionTest
assertEquals( "parent-a", pom.getValue( "build/plugins[1]/executions[1]/goals[5]" ) ); assertEquals( "parent-a", pom.getValue( "build/plugins[1]/executions[1]/goals[5]" ) );
} }
/*MNG-3938*/
public void testOverridingOfInheritedPluginExecutionsWithoutPluginManagement() public void testOverridingOfInheritedPluginExecutionsWithoutPluginManagement()
throws Exception throws Exception
{ {
PomTestWrapper pom = buildPom( "plugin-exec-merging/wo-plugin-mngt/sub" ); PomTestWrapper pom = buildPom( "plugin-exec-merging/wo-plugin-mngt/sub" );
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() ); assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
assertEquals( "child-default", pom.getValue( "build/plugins[1]/executions[@id='default-execution-id']/phase" ) ); 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" ) ); assertEquals( "child-non-default", pom.getValue( "build/plugins[1]/executions[@id='non-default']/phase" ) );
} }
@ -487,7 +488,7 @@ public class PomConstructionTest
{ {
PomTestWrapper pom = buildPom( "plugin-exec-merging/w-plugin-mngt/sub" ); PomTestWrapper pom = buildPom( "plugin-exec-merging/w-plugin-mngt/sub" );
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() ); assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
assertEquals( "child-default", pom.getValue( "build/plugins[1]/executions[@id='default-execution-id']/phase" ) ); 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" ) ); assertEquals( "child-non-default", pom.getValue( "build/plugins[1]/executions[@id='non-default']/phase" ) );
} }
@ -1205,8 +1206,7 @@ public class PomConstructionTest
assertEquals( "CHILD", pom.getValue( "properties/overridden" ) ); assertEquals( "CHILD", pom.getValue( "properties/overridden" ) );
assertEquals( "CHILD", pom.getValue( "properties/interpolated" ) ); assertEquals( "CHILD", pom.getValue( "properties/interpolated" ) );
} }
private void assertPathSuffixEquals( String expected, Object actual ) private void assertPathSuffixEquals( String expected, Object actual )
{ {
String a = actual.toString(); String a = actual.toString();

View File

@ -26,7 +26,7 @@
<version>1.0</version> <version>1.0</version>
<executions> <executions>
<execution> <execution>
<id>default-execution-id</id> <id>default</id>
<goals> <goals>
<goal>process</goal> <goal>process</goal>
</goals> </goals>

View File

@ -45,7 +45,7 @@ under the License.
<executions> <executions>
<execution> <execution>
<!-- NOTE: Explicitly reference "default" id here --> <!-- NOTE: Explicitly reference "default" id here -->
<id>default-execution-id</id> <id>default</id>
<phase>child-default</phase> <phase>child-default</phase>
</execution> </execution>
<execution> <execution>

View File

@ -45,7 +45,7 @@ under the License.
<executions> <executions>
<execution> <execution>
<!-- NOTE: Explicitly reference "default" id here --> <!-- NOTE: Explicitly reference "default" id here -->
<id>default-execution-id</id> <id>default</id>
<phase>child-default</phase> <phase>child-default</phase>
</execution> </execution>
<execution> <execution>