diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java index 602095864a..47af09d17d 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java @@ -77,4 +77,25 @@ public class MavenITmng3970DepResolutionFromProfileReposTest verifier.assertArtifactPresent( "org.apache.maven.its.mng3970", "a", "0.1", "jar" ); } + /** + * Test that dependencies can be resolved from remote repositories defined by (active) profiles in settings.xml. + */ + public void testitFromSettings() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3970/test-3" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteArtifacts( "org.apache.maven.its.mng3970" ); + verifier.filterFile( "settings.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); + verifier.getCliOptions().add( "--settings" ); + verifier.getCliOptions().add( "settings.xml" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier.assertArtifactPresent( "org.apache.maven.its.mng3970", "a", "0.1", "jar" ); + } + } diff --git a/its/core-it-suite/src/test/resources/mng-3970/test-3/pom.xml b/its/core-it-suite/src/test/resources/mng-3970/test-3/pom.xml new file mode 100644 index 0000000000..d9da0fc1ab --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-3970/test-3/pom.xml @@ -0,0 +1,60 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng3970 + test + 0.3 + + Maven Integration Test :: MNG-3970 + + Test that dependencies can be resolved from remote repositories defined by (active) profiles in settings.xml. + + + + + org.apache.maven.its.mng3970 + a + 0.1 + + + + + + + org.apache.maven.its.plugins + maven-it-plugin-dependency-resolution + 2.1-SNAPSHOT + + + test + validate + + compile + + + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.jar b/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.jar new file mode 100644 index 0000000000..33468cbb0c Binary files /dev/null and b/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.jar differ diff --git a/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.pom b/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.pom new file mode 100644 index 0000000000..e82a0115e5 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.pom @@ -0,0 +1,36 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng3970 + a + 0.1 + jar + + + + maven-core-it + file:///${basedir}/repo + + + diff --git a/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml b/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml new file mode 100644 index 0000000000..f7b82c6e63 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml @@ -0,0 +1,12 @@ + + org.apache.maven.its.mng3970 + a + 0.1 + + 0.1 + + 0.1 + + 20090106134643 + + \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-3970/test-3/settings.xml b/its/core-it-suite/src/test/resources/mng-3970/test-3/settings.xml new file mode 100644 index 0000000000..29a86876db --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-3970/test-3/settings.xml @@ -0,0 +1,43 @@ + + + + + + + mng-3970 + + + + mng-3970 + + + maven-core-it + @baseurl@/repo + + ignore + + + ignore + + + + + +