From e2795bbd56ca2a4e5e1cab5609db7f0e27e959e9 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sun, 14 Nov 2010 18:01:46 +0000 Subject: [PATCH] o Extended IT to check both downstream and upstream module handling git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@1035035 13f79535-47bb-0310-9956-ffa450edef68 --- ...0MakeLikeReactorConsidersVersionsTest.java | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java index 54fa75a298..e77e00ac21 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4890MakeLikeReactorConsidersVersionsTest.java @@ -40,9 +40,9 @@ public class MavenITmng4890MakeLikeReactorConsidersVersionsTest /** * 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. + * dependencies and the modules which need to be build. This variant checks calculation of upstream modules. */ - public void testit() + public void testitAM() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4890" ); @@ -51,10 +51,11 @@ public class MavenITmng4890MakeLikeReactorConsidersVersionsTest verifier.setAutoclean( false ); verifier.deleteDirectory( "target" ); verifier.deleteDirectory( "mod-a/target" ); - verifier.deleteDirectory( "mob-b/target" ); + verifier.deleteDirectory( "mod-b/target" ); verifier.getCliOptions().add( "--projects" ); verifier.getCliOptions().add( "mod-b" ); verifier.getCliOptions().add( "--also-make" ); + verifier.setLogFileName( "log-am.txt" ); verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); @@ -64,4 +65,31 @@ public class MavenITmng4890MakeLikeReactorConsidersVersionsTest verifier.assertFileNotPresent( "target/touch.txt" ); } + /** + * 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. This variant checks calculation of downstream modules. + */ + public void testitAMD() + 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( "mod-b/target" ); + verifier.getCliOptions().add( "--projects" ); + verifier.getCliOptions().add( "mod-a" ); + verifier.getCliOptions().add( "--also-make-dependents" ); + verifier.setLogFileName( "log-amd.txt" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier.assertFilePresent( "mod-a/target/touch.txt" ); + verifier.assertFileNotPresent( "mod-b/target/touch.txt" ); + verifier.assertFileNotPresent( "target/touch.txt" ); + } + }