diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index c8e9d4a226..d4195b5968 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -74,8 +74,10 @@ public class IntegrationTestSuite // ------------------------------------------------------------------------------------------------------------- // Tests that currently don't pass for any Maven version, i.e. the corresponding issue hasn't been resolved yet // ------------------------------------------------------------------------------------------------------------- + // suite.addTestSuite( MavenITmng4048VersionRangeReactorResolutionTest.class ); // suite.addTestSuite( MavenITmng3890TransitiveDependencyScopeUpdateTest.class ); // suite.addTestSuite( MavenITmng3814BogusProjectCycleTest.class ); + // suite.addTestSuite( MavenITmng3714ToolchainsCliOptionTest.class ); // suite.addTestSuite( MavenITmng3645POMSyntaxErrorTest.class ); // suite.addTestSuite( MavenITmng3391ImportScopeErrorScenariosTest.class ); // suite.addTestSuite( MavenITmng3139UseCachedMetadataOfBlacklistedRepoTest.class ); @@ -83,7 +85,6 @@ public class IntegrationTestSuite // suite.addTestSuite( MavenITmng2994SnapshotRangeRepositoryTest.class ); // suite.addTestSuite( MavenITmng2771PomExtensionComponentOverrideTest.class ); // suite.addTestSuite( MavenITmng0612NewestConflictResolverTest.class ); - // suite.addTestSuite( MavenITmng3714ToolchainsCliOptionTest.class ); // ------------------------------------------------------------------------------------------------------------- // Tests that don't run stable and need to be fixed diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4048VersionRangeReactorResolutionTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4048VersionRangeReactorResolutionTest.java new file mode 100644 index 0000000000..322ac53534 --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4048VersionRangeReactorResolutionTest.java @@ -0,0 +1,61 @@ +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 MNG-4048. + * + * @author Benjamin Bentmann + */ +public class MavenITmng4048VersionRangeReactorResolutionTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng4048VersionRangeReactorResolutionTest() + { + super( "[4.0,)" ); + } + + /** + * Verify that dependencies using version ranges can be resolved from the reactor. + */ + public void testit() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4048" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "sub-2/target" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + List artifacts = verifier.loadLines( "sub-2/target/compile.txt", "UTF-8" ); + assertTrue( artifacts.toString(), artifacts.contains( "org.apache.maven.its.mng4048:sub-1:jar:1.1-SNAPSHOT" ) ); + } + +} diff --git a/its/core-it-suite/src/test/resources/mng-4048/pom.xml b/its/core-it-suite/src/test/resources/mng-4048/pom.xml new file mode 100644 index 0000000000..112d145c2c --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4048/pom.xml @@ -0,0 +1,39 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng4048 + parent + 1.0-SNAPSHOT + pom + + Maven Integration Test :: MNG-4048 + + Verify that dependencies using version ranges can be resolved from the reactor. + + + + sub-1 + sub-2 + + diff --git a/its/core-it-suite/src/test/resources/mng-4048/sub-1/pom.xml b/its/core-it-suite/src/test/resources/mng-4048/sub-1/pom.xml new file mode 100644 index 0000000000..9280d15ffc --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4048/sub-1/pom.xml @@ -0,0 +1,61 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.mng4048 + parent + 1.0-SNAPSHOT + + + org.apache.maven.its.mng4048 + sub-1 + 1.1-SNAPSHOT + + Maven Integration Test :: MNG-4048 + + Verify that dependencies using version ranges can be resolved from the reactor. + + + + + + org.apache.maven.its.plugins + maven-it-plugin-artifact + 2.1-SNAPSHOT + + + package + validate + + pom.xml + + + set + + + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4048/sub-2/pom.xml b/its/core-it-suite/src/test/resources/mng-4048/sub-2/pom.xml new file mode 100644 index 0000000000..bfa378f6a5 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4048/sub-2/pom.xml @@ -0,0 +1,69 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.mng4048 + parent + 1.0-SNAPSHOT + + + org.apache.maven.its.mng4048 + sub-2 + 1.0-SNAPSHOT + + Maven Integration Test :: MNG-4048 + + Verify that dependencies using version ranges can be resolved from the reactor. + + + + + org.apache.maven.its.mng4048 + sub-1 + [1.0,) + + + + + + + org.apache.maven.its.plugins + maven-it-plugin-dependency-resolution + 2.1-SNAPSHOT + + + package + validate + + target/compile.txt + + + compile + + + + + + +