diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java index 1d17aa11bf..e09773aaae 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java @@ -54,13 +54,14 @@ public class MavenITmng3023ReactorDependencyResolutionTest // First pass. Make sure the dependency cannot be resolved. Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); verifier.setLogFileName( "log-a.txt" ); verifier.deleteArtifacts( "org.apache.maven.its.mng3023" ); try { - verifier.executeGoal( "initialize" ); + verifier.executeGoal( "validate" ); fail( "Expected failure to resolve dependency artifact without at least calling 'compile' phase." ); } catch ( VerificationException e ) @@ -87,11 +88,12 @@ public class MavenITmng3023ReactorDependencyResolutionTest File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3023" ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); verifier.setLogFileName( "log-b.txt" ); - + verifier.deleteDirectory( "consumer/target" ); verifier.deleteArtifacts( "org.apache.maven.its.mng3023" ); - verifier.executeGoal( "compile" ); + verifier.executeGoal( "initialize" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); @@ -118,11 +120,13 @@ public class MavenITmng3023ReactorDependencyResolutionTest File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3023" ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); verifier.deleteArtifacts( "org.apache.maven.its.mng3023" ); + verifier.deleteDirectory( "consumer/target" ); verifier.setLogFileName( "log-c-1.txt" ); - verifier.executeGoal( "install" ); + verifier.executeGoal( "generate-sources" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); @@ -130,8 +134,9 @@ public class MavenITmng3023ReactorDependencyResolutionTest assertTrue( compileClassPath.toString(), compileClassPath.contains( "dependency-1.jar" ) ); assertFalse( compileClassPath.toString(), compileClassPath.contains( "dependency-classes" ) ); + verifier.deleteDirectory( "consumer/target" ); verifier.setLogFileName( "log-c-2.txt" ); - verifier.executeGoal( "initialize" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); diff --git a/its/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml b/its/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml index 32f1870dd9..0de79bca9a 100644 --- a/its/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml @@ -1,13 +1,38 @@ + + + + 4.0.0 + - org.apache.maven.its.mng3023 - parent - 1 + org.apache.maven.its.mng3023 + parent + 1 - + consumer - + + Maven Integration Test :: MNG-3023 :: Consumer + Test that reactor projects are included in dependency resolution. + org.apache.maven.its.mng3023 @@ -15,7 +40,7 @@ 1 - + @@ -25,7 +50,7 @@ compile-classpath - initialize + validate compile diff --git a/its/core-it-suite/src/test/resources/mng-3023/dependency/dependency-classes/dependency-1.jar b/its/core-it-suite/src/test/resources/mng-3023/dependency/dependency-classes/dependency-1.jar new file mode 100644 index 0000000000..d1fb4ec7c0 Binary files /dev/null and b/its/core-it-suite/src/test/resources/mng-3023/dependency/dependency-classes/dependency-1.jar differ diff --git a/its/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml b/its/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml index 08139a615f..39c99223e9 100644 --- a/its/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml @@ -1,14 +1,70 @@ + + + + 4.0.0 + - org.apache.maven.its.mng3023 - parent - 1 + org.apache.maven.its.mng3023 + parent + 1 dependency + Maven Integration Test :: MNG-3023 :: Dependency + Test that reactor projects are included in dependency resolution. + dependency-classes + + + org.apache.maven.its.plugins + maven-it-plugin-artifact + 2.1-SNAPSHOT + + + compile + initialize + + set + + + dependency-classes + + + + install + generate-sources + + set + attach-pom + install + + + dependency-classes/dependency-1.jar + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-3023/dependency/src/main/java/org/apache/maven/debug/mng2720/App.java b/its/core-it-suite/src/test/resources/mng-3023/dependency/src/main/java/org/apache/maven/debug/mng2720/App.java deleted file mode 100644 index 2f8f544fd8..0000000000 --- a/its/core-it-suite/src/test/resources/mng-3023/dependency/src/main/java/org/apache/maven/debug/mng2720/App.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.maven.debug.mng2720; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} diff --git a/its/core-it-suite/src/test/resources/mng-3023/pom.xml b/its/core-it-suite/src/test/resources/mng-3023/pom.xml index f21e734f49..584db7dcde 100644 --- a/its/core-it-suite/src/test/resources/mng-3023/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-3023/pom.xml @@ -1,10 +1,34 @@ + + + + 4.0.0 - Test that reactor projects are included in dependency resolution. + org.apache.maven.its.mng3023 parent 1 pom + + Maven Integration Test :: MNG-3023 + Test that reactor projects are included in dependency resolution. dependency