Author: bentmann Date: Sun Nov 14 16:17:19 2010 New Revision: 1035017 URL: http://svn.apache.org/viewvc?rev=1035017&view=rev Log: [MNG-4890] -pl, -am and -amd options don't consider the version of the artefacts for building the reactor
o Added IT Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-a/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-a/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-b/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-b/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/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=1035017&r1=1035016&r2=1035017&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 Sun Nov 14 16:17:19 2010 @@ -85,6 +85,7 @@ public class IntegrationTestSuite suite.addTestSuite( MavenITmng4895PluginDepWithNonRelocatedMavenApiTest.class ); suite.addTestSuite( MavenITmng4891RobustSnapshotResolutionTest.class ); + suite.addTestSuite( MavenITmng4890MakeLikeReactorConsidersVersionsTest.class ); //suite.addTestSuite( MavenITmng4883FailUponOverconstrainedVersionRangesTest.class ); suite.addTestSuite( MavenITmng4877DeployUsingPrivateKeyTest.class ); suite.addTestSuite( MavenITmng4874UpdateLatestPluginVersionTest.class ); Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java?rev=1035017&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java Sun Nov 14 16:17:19 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; + +/** + * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4890">MNG-4890</a>. + * + * @author Benjamin Bentmann + */ +public class MavenITmng4890MakeLikeReactorConsidersVersionsTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng4890MakeLikeReactorConsidersVersionsTest() + { + super( "[3.0,)" ); + } + + /** + * Verify that the make-like reactor mode considers actual project versions when calculating the inter-module + * dependencies and the modules which need to be build. + */ + public void testit() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4890" ); + + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.deleteDirectory( "mod-a/target" ); + verifier.deleteDirectory( "mob-b/target" ); + verifier.getCliOptions().add( "--projects" ); + verifier.getCliOptions().add( "mod-b" ); + verifier.getCliOptions().add( "--also-make" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier.assertFilePresent( "mod-b/target/touch.txt" ); + verifier.assertFileNotPresent( "mod-a/target/touch.txt" ); + verifier.assertFileNotPresent( "target/touch.txt" ); + } + +} Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-a/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-a/pom.xml?rev=1035017&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-a/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-a/pom.xml Sun Nov 14 16:17:19 2010 @@ -0,0 +1,58 @@ +<?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.mng4890</groupId> + <artifactId>mod-a</artifactId> + <!-- NOTE: This isn't the same version that mod-b depends on! --> + <version>0.2-SNAPSHOT</version> + <packaging>jar</packaging> + + <name>Maven Integration Test :: MNG-4890 :: Module A</name> + <description> + Verify that the make-like reactor mode considers actual project versions when calculating the inter-module + dependencies and the modules which need to be build. + </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>default</id> + <phase>validate</phase> + <goals> + <goal>reset</goal> + </goals> + <configuration> + <logFile>target/touch.txt</logFile> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-a/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-a/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-b/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-b/pom.xml?rev=1035017&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-b/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-b/pom.xml Sun Nov 14 16:17:19 2010 @@ -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.mng4890</groupId> + <artifactId>mod-b</artifactId> + <version>0.2-SNAPSHOT</version> + <packaging>jar</packaging> + + <name>Maven Integration Test :: MNG-4890 :: Module B</name> + <description> + Verify that the make-like reactor mode considers actual project versions when calculating the inter-module + dependencies and the modules which need to be build. + </description> + + <dependencies> + <dependency> + <!-- NOTE: The reactor contains version 0.2-SNAPSHOT, not the 0.1 we depend on --> + <groupId>org.apache.maven.its.mng4890</groupId> + <artifactId>mod-a</artifactId> + <version>0.1</version> + </dependency> + </dependencies> + + <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>default</id> + <phase>validate</phase> + <goals> + <goal>reset</goal> + </goals> + <configuration> + <logFile>target/touch.txt</logFile> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-b/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/mod-b/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/pom.xml?rev=1035017&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/pom.xml Sun Nov 14 16:17:19 2010 @@ -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.mng4890</groupId> + <artifactId>aggregator</artifactId> + <version>0.2-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Maven Integration Test :: MNG-4890 :: Aggregator</name> + <description> + Verify that the make-like reactor mode considers actual project versions when calculating the inter-module + dependencies and the modules which need to be build. + </description> + + <modules> + <module>mod-a</module> <!-- mod-a:0.2-SNAPSHOT --> + <module>mod-b</module> <!-- depends on mod-a:0.1, not mod-a:0.2-SNAPSHOT, so mod-a isn't a prerequisite for mod-b --> + </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>default</id> + <phase>validate</phase> + <goals> + <goal>reset</goal> + </goals> + <configuration> + <logFile>target/touch.txt</logFile> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4890/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision