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 2009/04/10 14:43:35 UTC
svn commit: r763920 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/mng-4129/ resources/mng-4129/child-1/
resources/mng-4129/child-2/
Author: bentmann
Date: Fri Apr 10 12:43:35 2009
New Revision: 763920
URL: http://svn.apache.org/viewvc?rev=763920&view=rev
Log:
[MNG-4129] Execution's inherited is not working as expected.
o Added IT
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4129PluginExecutionInheritanceTest.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-1/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-1/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-2/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-2/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/pom.xml (with props)
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.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=763920&r1=763919&r2=763920&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 Fri Apr 10 12:43:35 2009
@@ -91,6 +91,7 @@
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng4129PluginExecutionInheritanceTest.class );
suite.addTestSuite( MavenITmng4126ParentProfilesXmlTest.class );
suite.addTestSuite( MavenITmng4116UndecodedUrlsTest.class );
suite.addTestSuite( MavenITmng4107InterpolationUsesDominantProfileSourceTest.class );
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4129PluginExecutionInheritanceTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4129PluginExecutionInheritanceTest.java?rev=763920&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4129PluginExecutionInheritanceTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4129PluginExecutionInheritanceTest.java Fri Apr 10 12:43:35 2009
@@ -0,0 +1,73 @@
+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 java.io.File;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4129">MNG-4129</a>.
+ *
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public class MavenITmng4129PluginExecutionInheritanceTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng4129PluginExecutionInheritanceTest()
+ {
+ super( "[3.0-alpha-3,)" );
+ }
+
+ /**
+ * Verify that plugin executions defined in the parent with inherited=false are not executed in child modules.
+ */
+ public void testit()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4129" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.deleteDirectory( "child-1/target" );
+ verifier.deleteDirectory( "child-2/target" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ List executions = verifier.loadLines( "target/executions.txt", "UTF-8" );
+ Collections.sort( executions );
+ assertEquals( Arrays.asList( new String[] { "inherited-execution", "non-inherited-execution" } ), executions );
+
+ List executions1 = verifier.loadLines( "child-1/target/executions.txt", "UTF-8" );
+ assertEquals( Collections.singletonList( "inherited-execution" ), executions1 );
+
+ List executions2 = verifier.loadLines( "child-2/target/executions.txt", "UTF-8" );
+ assertEquals( Collections.singletonList( "inherited-execution" ), executions2 );
+ }
+
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4129PluginExecutionInheritanceTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4129PluginExecutionInheritanceTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-1/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-1/pom.xml?rev=763920&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-1/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-1/pom.xml Fri Apr 10 12:43:35 2009
@@ -0,0 +1,48 @@
+<?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.mng4129</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ </parent>
+
+ <artifactId>child-1</artifactId>
+
+ <name>Maven Integration Test :: MNG-4129 :: Child-1</name>
+ <description>
+ Verify that plugin executions defined in the parent with inherited=false are not executed in child modules.
+ </description>
+
+ <build>
+ <plugins>
+ <!-- NOTE: It's essential part of this test variant to redefine the test plugin again, i.e. trigger plugin merging -->
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-log-file</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-1/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-1/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-2/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-2/pom.xml?rev=763920&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-2/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-2/pom.xml Fri Apr 10 12:43:35 2009
@@ -0,0 +1,43 @@
+<?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.mng4129</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ </parent>
+
+ <artifactId>child-2</artifactId>
+
+ <name>Maven Integration Test :: MNG-4129 :: Child-2</name>
+ <description>
+ Verify that plugin executions defined in the parent with inherited=false are not executed in child modules.
+ </description>
+
+ <build>
+ <plugins>
+ <!-- NOTE: It's essential part of this test variant to *not* define the test plugin again, i.e. bypass plugin merging -->
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-2/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/child-2/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/pom.xml?rev=763920&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/pom.xml Fri Apr 10 12:43:35 2009
@@ -0,0 +1,75 @@
+<?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.mng4129</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-4129</name>
+ <description>
+ Verify that plugin executions defined in the parent with inherited=false are not executed in child modules.
+ </description>
+
+ <modules>
+ <module>child-1</module>
+ <module>child-2</module>
+ </modules>
+
+ <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>inherited-execution</id>
+ <inherited>true</inherited>
+ <phase>validate</phase>
+ <goals>
+ <goal>log-string</goal>
+ </goals>
+ <configuration>
+ <logFile>target/executions.txt</logFile>
+ <string>inherited-execution</string>
+ </configuration>
+ </execution>
+ <execution>
+ <id>non-inherited-execution</id>
+ <inherited>false</inherited>
+ <phase>validate</phase>
+ <goals>
+ <goal>log-string</goal>
+ </goals>
+ <configuration>
+ <logFile>target/executions.txt</logFile>
+ <string>non-inherited-execution</string>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4129/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision