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 17:18:54 UTC
svn commit: r728719 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/mng-3937/ resources/mng-3937/test-1/
resources/mng-3937/test-1/sub/ resources/mng-3937/test-2/
resources/mng-3937/test-2/sub/
Author: bentmann
Date: Mon Dec 22 08:18:54 2008
New Revision: 728719
URL: http://svn.apache.org/viewvc?rev=728719&view=rev
Log:
[MNG-3937] [regression] Goals inherited from parent are lost when merging with child execution
o Added IT
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3937MergedPluginExecutionGoalsTest.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/sub/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/sub/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/sub/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/sub/pom.xml (with props)
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3906MergedPluginClassPathOrderingTest.java
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=728719&r1=728718&r2=728719&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Mon Dec 22 08:18:54 2008
@@ -90,6 +90,7 @@
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng3937MergedPluginExecutionGoalsTest.class );
suite.addTestSuite( MavenITmng3927PluginDefaultExecutionConfigTest.class );
suite.addTestSuite( MavenITmng3924XmlMarkupInterpolationTest.class );
suite.addTestSuite( MavenITmng3925MergedPluginExecutionOrderTest.class );
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3906MergedPluginClassPathOrderingTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3906MergedPluginClassPathOrderingTest.java?rev=728719&r1=728718&r2=728719&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3906MergedPluginClassPathOrderingTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3906MergedPluginClassPathOrderingTest.java Mon Dec 22 08:18:54 2008
@@ -43,7 +43,7 @@
/**
* Test that project-level plugin dependencies are properly merged during inheritance.
*/
- public void testitMNG3813()
+ public void testitMNG3906()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3906" );
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3937MergedPluginExecutionGoalsTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3937MergedPluginExecutionGoalsTest.java?rev=728719&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3937MergedPluginExecutionGoalsTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3937MergedPluginExecutionGoalsTest.java Mon Dec 22 08:18:54 2008
@@ -0,0 +1,81 @@
+package org.apache.maven.it;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-3937">MNG-3937</a>.
+ *
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public class MavenITmng3937MergedPluginExecutionGoalsTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng3937MergedPluginExecutionGoalsTest()
+ {
+ }
+
+ /**
+ * Test that during inheritance/merging of a plugin execution the goals specified by child and parent are properly
+ * ordered when no <pluginManagement> is involved.
+ */
+ public void testitWithoutPluginManagement()
+ throws Exception
+ {
+ testitMNG3937( "test-1" );
+ }
+
+ /**
+ * Test that during inheritance/merging of a plugin execution the goals specified by child and parent are properly
+ * ordered when <pluginManagement> is involved.
+ */
+ public void testitWithPluginManagement()
+ throws Exception
+ {
+ testitMNG3937( "test-2" );
+ }
+
+ private void testitMNG3937( String project )
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3937" );
+
+ Verifier verifier = new Verifier( new File( new File( testDir, project ), "sub" ).getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ List lines = verifier.loadLines( "target/exec.log", "UTF-8" );
+ // Order is child first and parent appended but without duplicate goals
+ List expected = Arrays.asList( new String[] { "child", "----" } );
+ assertEquals( expected, lines );
+ }
+
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3937MergedPluginExecutionGoalsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3937MergedPluginExecutionGoalsTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/pom.xml?rev=728719&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/pom.xml Mon Dec 22 08:18:54 2008
@@ -0,0 +1,60 @@
+<?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.mng3937</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-3937</name>
+ <description>
+ Test that during inheritance/merging of a plugin execution the goals specified by child and parent are properly
+ ordered.
+ </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-log-file</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>merge</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>reset</goal>
+ <goal>log-separator</goal>
+ </goals>
+ <configuration>
+ <logFile>target/parent.log</logFile>
+ <length>4</length>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/sub/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/sub/pom.xml?rev=728719&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/sub/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/sub/pom.xml Mon Dec 22 08:18:54 2008
@@ -0,0 +1,62 @@
+<?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>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng3937</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ </parent>
+
+ <artifactId>child</artifactId>
+
+ <name>Maven Integration Test :: MNG-3937</name>
+ <description>
+ Test that during inheritance/merging of a plugin execution the goals specified by child and parent are properly
+ ordered.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-log-file</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>merge</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>reset</goal>
+ <goal>log-string</goal>
+ </goals>
+ <configuration>
+ <logFile>target/exec.log</logFile>
+ <string>child</string>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/sub/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-1/sub/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/pom.xml?rev=728719&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/pom.xml Mon Dec 22 08:18:54 2008
@@ -0,0 +1,62 @@
+<?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.mng3937</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-3937</name>
+ <description>
+ Test that during inheritance/merging of a plugin execution the goals specified by child and parent are properly
+ ordered.
+ </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-log-file</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>merge</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>reset</goal>
+ <goal>log-separator</goal>
+ </goals>
+ <configuration>
+ <logFile>target/parent.log</logFile>
+ <length>4</length>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/sub/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/sub/pom.xml?rev=728719&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/sub/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/sub/pom.xml Mon Dec 22 08:18:54 2008
@@ -0,0 +1,62 @@
+<?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>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng3937</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ </parent>
+
+ <artifactId>child</artifactId>
+
+ <name>Maven Integration Test :: MNG-3937</name>
+ <description>
+ Test that during inheritance/merging of a plugin execution the goals specified by child and parent are properly
+ ordered.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-log-file</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>merge</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>reset</goal>
+ <goal>log-string</goal>
+ </goals>
+ <configuration>
+ <logFile>target/exec.log</logFile>
+ <string>child</string>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/sub/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3937/test-2/sub/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision