You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/12/22 15:11:04 UTC

svn commit: r728698 - in /maven/components/trunk/maven-project/src/test: java/org/apache/maven/project/builder/ resources-project-builder/plugin-exec-goals-order/ resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/ resources-project-builde...

Author: bentmann
Date: Mon Dec 22 06:11:03 2008
New Revision: 728698

URL: http://svn.apache.org/viewvc?rev=728698&view=rev
Log:
o Splitted tests to ease understanding/debugging

Added:
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/pom.xml   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/pom.xml   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/pom.xml   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/pom.xml   (with props)
Removed:
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/pom.xml
    maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/pom.xml
Modified:
    maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java

Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java?rev=728698&r1=728697&r2=728698&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java (original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java Mon Dec 22 06:11:03 2008
@@ -101,40 +101,56 @@
     */
 
     /* FIXME: cf. MNG-3886
-    public void testOrderOfGoalsFromPluginExecution()
+    public void testOrderOfGoalsFromPluginExecutionWithoutPluginManagement()
         throws Exception
     {
-        PomTestWrapper pom = buildPom( "plugin-exec-goals-order" );
+        PomTestWrapper pom = buildPom( "plugin-exec-goals-order/wo-plugin-mngt" );
+        assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
         assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
         assertEquals( "a", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) );
         assertEquals( "d", pom.getValue( "build/plugins[1]/executions[1]/goals[3]" ) );
         assertEquals( "c", pom.getValue( "build/plugins[1]/executions[1]/goals[4]" ) );
         assertEquals( "e", pom.getValue( "build/plugins[1]/executions[1]/goals[5]" ) );
-        assertEquals( "b", pom.getValue( "build/plugins[2]/executions[1]/goals[1]" ) );
-        assertEquals( "a", pom.getValue( "build/plugins[2]/executions[1]/goals[2]" ) );
-        assertEquals( "d", pom.getValue( "build/plugins[2]/executions[1]/goals[3]" ) );
-        assertEquals( "c", pom.getValue( "build/plugins[2]/executions[1]/goals[4]" ) );
-        assertEquals( "e", pom.getValue( "build/plugins[2]/executions[1]/goals[5]" ) );
     }
-    */
+
+    public void testOrderOfGoalsFromPluginExecutionWithPluginManagement()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "plugin-exec-goals-order/w-plugin-mngt" );
+        assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
+        assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
+        assertEquals( "a", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) );
+        assertEquals( "d", pom.getValue( "build/plugins[1]/executions[1]/goals[3]" ) );
+        assertEquals( "c", pom.getValue( "build/plugins[1]/executions[1]/goals[4]" ) );
+        assertEquals( "e", pom.getValue( "build/plugins[1]/executions[1]/goals[5]" ) );
+    }
+    //*/
 
     /* FIXME: cf. MNG-3887
-    public void testOrderOfPluginExecutions()
+    public void testOrderOfPluginExecutionsWithoutPluginManagement()
         throws Exception
     {
-        PomTestWrapper pom = buildPom( "plugin-exec-order" );
-        assertEquals( "ab", pom.getValue( "build/plugins[1]/executions[1]/id" ) );
-        assertEquals( "aa", pom.getValue( "build/plugins[1]/executions[2]/id" ) );
-        assertEquals( "ad", pom.getValue( "build/plugins[1]/executions[3]/id" ) );
-        assertEquals( "ac", pom.getValue( "build/plugins[1]/executions[4]/id" ) );
-        assertEquals( "ae", pom.getValue( "build/plugins[1]/executions[5]/id" ) );
-        assertEquals( "bb", pom.getValue( "build/plugins[2]/executions[1]/id" ) );
-        assertEquals( "ba", pom.getValue( "build/plugins[2]/executions[2]/id" ) );
-        assertEquals( "bd", pom.getValue( "build/plugins[2]/executions[3]/id" ) );
-        assertEquals( "bc", pom.getValue( "build/plugins[2]/executions[4]/id" ) );
-        assertEquals( "be", pom.getValue( "build/plugins[2]/executions[5]/id" ) );
+        PomTestWrapper pom = buildPom( "plugin-exec-order/wo-plugin-mngt" );
+        assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
+        assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/id" ) );
+        assertEquals( "a", pom.getValue( "build/plugins[1]/executions[2]/id" ) );
+        assertEquals( "d", pom.getValue( "build/plugins[1]/executions[3]/id" ) );
+        assertEquals( "c", pom.getValue( "build/plugins[1]/executions[4]/id" ) );
+        assertEquals( "e", pom.getValue( "build/plugins[1]/executions[5]/id" ) );
     }
-    */
+
+    public void testOrderOfPluginExecutionsWithPluginManagement()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "plugin-exec-order/w-plugin-mngt" );
+        assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
+        assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/id" ) );
+        assertEquals( "a", pom.getValue( "build/plugins[1]/executions[2]/id" ) );
+        assertEquals( "d", pom.getValue( "build/plugins[1]/executions[3]/id" ) );
+        assertEquals( "c", pom.getValue( "build/plugins[1]/executions[4]/id" ) );
+        assertEquals( "e", pom.getValue( "build/plugins[1]/executions[5]/id" ) );
+    }
+    //*/
 
     /* FIXME: cf. MNG-3925
     public void testOrderOfMergedPluginExecutionsWithoutPluginManagement()

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/pom.xml?rev=728698&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/pom.xml Mon Dec 22 06:11:03 2008
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng3886</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-3886</name> 
+  <description>
+    Test that the goals from a plugin execution are executed in the order given by the POM, regardless whether
+    plugin management is present or not.
+  </description>
+
+  <build>
+    <!-- This project uses plugin management for the test plugin -->
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.its.plugins</groupId>
+          <artifactId>maven-it-plugin-a</artifactId>
+          <version>1.0-SNAPSHOT</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-a</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>b</goal>
+              <goal>a</goal>
+              <goal>d</goal>
+              <goal>c</goal>
+              <goal>e</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/w-plugin-mngt/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/pom.xml?rev=728698&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/pom.xml Mon Dec 22 06:11:03 2008
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng3886</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-3886</name> 
+  <description>
+    Test that the goals from a plugin execution are executed in the order given by the POM, regardless whether
+    plugin management is present or not.
+  </description>
+
+  <build>
+    <!-- This project does not use plugin management for the test plugin -->
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-a</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>b</goal>
+              <goal>a</goal>
+              <goal>d</goal>
+              <goal>c</goal>
+              <goal>e</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/wo-plugin-mngt/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/pom.xml?rev=728698&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/pom.xml Mon Dec 22 06:11:03 2008
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng3887</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-3887</name> 
+  <description>
+    Test that multiple plugin executions bound to the same phase are executed in the order given by the POM.
+  </description>
+
+  <build>
+    <!-- This project uses plugin management for the test plugin -->
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.its.plugins</groupId>
+          <artifactId>maven-it-plugin-a</artifactId>
+          <version>1.0-SNAPSHOT</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-a</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>b</id>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>a</id>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>d</id>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>c</id>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>e</id>
+            <phase>validate</phase>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/w-plugin-mngt/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/pom.xml?rev=728698&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/pom.xml Mon Dec 22 06:11:03 2008
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng3887</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-3887</name> 
+  <description>
+    Test that multiple plugin executions bound to the same phase are executed in the order given by the POM.
+  </description>
+
+  <build>
+    <!-- This project does not use plugin management for the test plugin -->
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-a</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>b</id>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>a</id>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>d</id>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>c</id>
+            <phase>validate</phase>
+          </execution>
+          <execution>
+            <id>e</id>
+            <phase>validate</phase>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/plugin-exec-order/wo-plugin-mngt/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision