From cda737a6fe34612d14792517b406314b4b13eba6 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sun, 1 Mar 2009 22:30:36 +0000 Subject: [PATCH] o Decoupled IT from production plugins git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@749141 13f79535-47bb-0310-9956-ffa450edef68 --- ...ng3023ReactorDependencyResolutionTest.java | 15 +++-- .../test/resources/mng-3023/consumer/pom.xml | 39 +++++++++-- .../dependency-classes/dependency-1.jar | Bin 0 -> 345 bytes .../resources/mng-3023/dependency/pom.xml | 62 +++++++++++++++++- .../org/apache/maven/debug/mng2720/App.java | 13 ---- .../src/test/resources/mng-3023/pom.xml | 26 +++++++- 6 files changed, 126 insertions(+), 29 deletions(-) create mode 100644 its/core-it-suite/src/test/resources/mng-3023/dependency/dependency-classes/dependency-1.jar delete mode 100644 its/core-it-suite/src/test/resources/mng-3023/dependency/src/main/java/org/apache/maven/debug/mng2720/App.java 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 0000000000000000000000000000000000000000..d1fb4ec7c0f84526957f46ecc6b6deac7d4a076a GIT binary patch literal 345 zcmWIWW@Zs#-~ht*U5Qo + + + 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