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 2010/09/04 22:20:05 UTC
svn commit: r992669 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/mng-4795/ resources/mng-4795/sub/
Author: bentmann
Date: Sat Sep 4 20:20:04 2010
New Revision: 992669
URL: http://svn.apache.org/viewvc?rev=992669&view=rev
Log:
[MNG-4795] [regression] Dependencies in forked reactor projects are not resolved when aggregator bound to lifecycle forks
o Added IT
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/sub/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/sub/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=992669&r1=992668&r2=992669&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 Sat Sep 4 20:20:04 2010
@@ -81,6 +81,7 @@ public class IntegrationTestSuite
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest.class );
suite.addTestSuite( MavenITmng4791ProjectBuilderResolvesRemotePomArtifactTest.class );
suite.addTestSuite( MavenITmng4789ScopeInheritanceMeetsConflictTest.class );
suite.addTestSuite( MavenITmng4786AntBased21xMojoSupportTest.class );
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest.java?rev=992669&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest.java Sat Sep 4 20:20:04 2010
@@ -0,0 +1,67 @@
+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.List;
+import java.util.Properties;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4795">MNG-4795</a>.
+ *
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest()
+ {
+ super( "[2.0.3,3.0-alpha-1),[3.0-beta-1,)" );
+ }
+
+ /**
+ * Test that reactor projects forked by an aggregator mojo bound to a lifecycle phase are subject to dependency
+ * resolution as required by their respective build plugins.
+ */
+ public void testit()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4795" );
+
+ Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.deleteDirectory( "sub/target" );
+ verifier.executeGoal( "process-sources" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ List compile0 = verifier.loadLines( "sub/target/compile-0.txt", "UTF-8" );
+ assertTrue( compile0.toString(), compile0.contains( "maven-core-it-support-1.0.jar" ) );
+
+ List compile1 = verifier.loadLines( "sub/target/compile-1.txt", "UTF-8" );
+ assertTrue( compile1.toString(), compile1.contains( "maven-core-it-support-1.0.jar" ) );
+ }
+
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4795DepResolutionInReactorProjectForkedByLifecycleTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/pom.xml?rev=992669&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/pom.xml Sat Sep 4 20:20:04 2010
@@ -0,0 +1,59 @@
+<?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.mng4795</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-4795</name>
+ <description>
+ Test that reactor projects forked by an aggregator mojo bound to a lifecycle phase are subject to dependency
+ resolution as required by their respective build plugins.
+ </description>
+
+ <modules>
+ <module>sub</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-fork</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>fork-reactor</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>fork-lifecycle-aggregator</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/sub/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/sub/pom.xml?rev=992669&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/sub/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/sub/pom.xml Sat Sep 4 20:20:04 2010
@@ -0,0 +1,74 @@
+<?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>
+ <!-- NOTE: inheritance from parent is rather important here as it makes the parent build first -->
+ <groupId>org.apache.maven.its.mng4795</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+ </parent>
+
+ <groupId>org.apache.maven.its.mng4795</groupId>
+ <artifactId>sub</artifactId>
+ <version>0.1</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: MNG-4795 :: Sub</name>
+ <description>
+ Test that reactor projects forked by an aggregator mojo bound to a lifecycle phase are subject to dependency
+ resolution as required by their respective build plugins.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its</groupId>
+ <artifactId>maven-core-it-support</artifactId>
+ <version>1.0</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileClassPath>target/compile-@idx@.txt</compileClassPath>
+ <significantPathLevels>1</significantPathLevels>
+ </configuration>
+ <executions>
+ <execution>
+ <id>resolve</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/sub/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4795/sub/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision