Author: bentmann Date: Tue Feb 10 18:06:51 2009 New Revision: 743036 URL: http://svn.apache.org/viewvc?rev=743036&view=rev Log: [MNG-4026] [regression] Order of project class path does not match POM order during reactor build
o Added IT Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4026ReactorDependenciesOrderTest.java (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/consumer/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/consumer/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-1/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-1/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-2/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-2/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-3/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-3/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-4/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-4/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/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=743036&r1=743035&r2=743036&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 Tue Feb 10 18:06:51 2009 @@ -90,6 +90,7 @@ // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class ); // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 + suite.addTestSuite( MavenITmng4026ReactorDependenciesOrderTest.class ); suite.addTestSuite( MavenITmng4023ParentProfileOneTimeInjectionTest.class ); suite.addTestSuite( MavenITmng4016PrefixedPropertyInterpolationTest.class ); suite.addTestSuite( MavenITmng4009InheritProfileEffectsTest.class ); Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4026ReactorDependenciesOrderTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4026ReactorDependenciesOrderTest.java?rev=743036&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4026ReactorDependenciesOrderTest.java (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4026ReactorDependenciesOrderTest.java Tue Feb 10 18:06:51 2009 @@ -0,0 +1,72 @@ +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; + +/** + * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4023">MNG-4023</a>. + * + * @author Benjamin Bentmann + * @version $Id$ + */ +public class MavenITmng4026ReactorDependenciesOrderTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng4026ReactorDependenciesOrderTest() + { + // This feature depends on MNG-1412 + super( "(2.0.8,)" ); + } + + /** + * Verify that the project class path is properly ordered during a reactor build, i.e. when dependencies are + * resolved as active project artifacts from the reactor. + */ + public void testitMNG4026() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4026" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "consumer/target" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + List classpath1 = verifier.loadLines( "consumer/target/classpath-1.txt", "UTF-8" ); + assertEquals( 5, classpath1.size() ); + assertEquals( "consumer/classes", classpath1.get( 0 ) ); + assertEquals( "dep-1/pom.xml", classpath1.get( 1 ) ); + assertEquals( "dep-3/pom.xml", classpath1.get( 2 ) ); + assertEquals( "dep-2/pom.xml", classpath1.get( 3 ) ); + assertEquals( "dep-4/pom.xml", classpath1.get( 4 ) ); + + List classpath2 = verifier.loadLines( "consumer/target/classpath-2.txt", "UTF-8" ); + assertEquals( classpath1, classpath2 ); + } + +} Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4026ReactorDependenciesOrderTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4026ReactorDependenciesOrderTest.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/consumer/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/consumer/pom.xml?rev=743036&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/consumer/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/consumer/pom.xml Tue Feb 10 18:06:51 2009 @@ -0,0 +1,103 @@ +<?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.mng4026</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>consumer</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Maven Integration Test :: MNG-4026 :: Consumer</name> + <description> + Verify that the project class path is properly ordered during a reactor build, i.e. when dependencies are + resolved as active project artifacts from the reactor. + </description> + + <dependencies> + <!-- NOTE: The dependencies are intentionally not in alpha order --> + <dependency> + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>dep-1</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>dep-3</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>dep-2</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>dep-4</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> + + <build> + <outputDirectory>classes</outputDirectory> + <plugins> + <plugin> + <groupId>org.apache.maven.its.plugins</groupId> + <artifactId>maven-it-plugin-dependency-resolution</artifactId> + <version>2.1-SNAPSHOT</version> + <executions> + <execution> + <id>test-1</id> + <phase>validate</phase> + <goals> + <goal>runtime</goal> + </goals> + <configuration> + <runtimeClassPath>target/classpath-1.txt</runtimeClassPath> + <significantPathLevels>2</significantPathLevels> + </configuration> + </execution> + <execution> + <!-- + NOTE: This second execution is essential part of the test to check caching/re-resolution effects and + things like. After all, dependency resolution should be reproducible. + --> + <id>test-2</id> + <phase>validate</phase> + <goals> + <goal>runtime</goal> + </goals> + <configuration> + <runtimeClassPath>target/classpath-2.txt</runtimeClassPath> + <significantPathLevels>2</significantPathLevels> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/consumer/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/consumer/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-1/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-1/pom.xml?rev=743036&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-1/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-1/pom.xml Tue Feb 10 18:06:51 2009 @@ -0,0 +1,63 @@ +<?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.mng4026</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>dep-1</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Maven Integration Test :: MNG-4026 :: Dependency 1</name> + <description> + Verify that the project class path is properly ordered during a reactor build, i.e. when dependencies are + resolved as active project artifacts from the reactor. + </description> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.its.plugins</groupId> + <artifactId>maven-it-plugin-artifact</artifactId> + <version>2.1-SNAPSHOT</version> + <configuration> + <mainFile>pom.xml</mainFile> + </configuration> + <executions> + <execution> + <id>test</id> + <phase>validate</phase> + <goals> + <!-- mimic phase "package" --> + <goal>set</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-1/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-1/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-2/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-2/pom.xml?rev=743036&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-2/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-2/pom.xml Tue Feb 10 18:06:51 2009 @@ -0,0 +1,63 @@ +<?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.mng4026</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>dep-2</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Maven Integration Test :: MNG-4026 :: Dependency 2</name> + <description> + Verify that the project class path is properly ordered during a reactor build, i.e. when dependencies are + resolved as active project artifacts from the reactor. + </description> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.its.plugins</groupId> + <artifactId>maven-it-plugin-artifact</artifactId> + <version>2.1-SNAPSHOT</version> + <configuration> + <mainFile>pom.xml</mainFile> + </configuration> + <executions> + <execution> + <id>test</id> + <phase>validate</phase> + <goals> + <!-- mimic phase "package" --> + <goal>set</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-2/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-2/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-3/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-3/pom.xml?rev=743036&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-3/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-3/pom.xml Tue Feb 10 18:06:51 2009 @@ -0,0 +1,63 @@ +<?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.mng4026</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>dep-3</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Maven Integration Test :: MNG-4026 :: Dependency 3</name> + <description> + Verify that the project class path is properly ordered during a reactor build, i.e. when dependencies are + resolved as active project artifacts from the reactor. + </description> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.its.plugins</groupId> + <artifactId>maven-it-plugin-artifact</artifactId> + <version>2.1-SNAPSHOT</version> + <configuration> + <mainFile>pom.xml</mainFile> + </configuration> + <executions> + <execution> + <id>test</id> + <phase>validate</phase> + <goals> + <!-- mimic phase "package" --> + <goal>set</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-3/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-3/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-4/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-4/pom.xml?rev=743036&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-4/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-4/pom.xml Tue Feb 10 18:06:51 2009 @@ -0,0 +1,63 @@ +<?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.mng4026</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>dep-4</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Maven Integration Test :: MNG-4026 :: Dependency 4</name> + <description> + Verify that the project class path is properly ordered during a reactor build, i.e. when dependencies are + resolved as active project artifacts from the reactor. + </description> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.its.plugins</groupId> + <artifactId>maven-it-plugin-artifact</artifactId> + <version>2.1-SNAPSHOT</version> + <configuration> + <mainFile>pom.xml</mainFile> + </configuration> + <executions> + <execution> + <id>test</id> + <phase>validate</phase> + <goals> + <!-- mimic phase "package" --> + <goal>set</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-4/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/dep-4/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/pom.xml?rev=743036&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/pom.xml Tue Feb 10 18:06:51 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> + + <groupId>org.apache.maven.its.mng4026</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Maven Integration Test :: MNG-4026</name> + <description> + Verify that the project class path is properly ordered during a reactor build, i.e. when dependencies are + resolved as active project artifacts from the reactor. + </description> + + <modules> + <module>dep-1</module> + <module>dep-2</module> + <module>dep-3</module> + <module>dep-4</module> + <module>consumer</module> + </modules> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4026/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision