From 7f25ba33bce81f0e54e3145ce8255327c56a0de3 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Fri, 17 Jul 2009 17:18:03 +0000 Subject: [PATCH] [MNG-4244] Allow to select project for make-like reactor by artifact id o Added IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@795151 13f79535-47bb-0310-9956-ffa450edef68 --- .../it/MavenITmng2576MakeLikeReactorTest.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2576MakeLikeReactorTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2576MakeLikeReactorTest.java index 761bb961ac..32e1e35c6d 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2576MakeLikeReactorTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2576MakeLikeReactorTest.java @@ -181,7 +181,7 @@ public class MavenITmng2576MakeLikeReactorTest /** * Verify that the project list can also specify project ids. */ - public void testitMakeById() + public void testitMatchesById() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2576" ); @@ -203,6 +203,34 @@ public class MavenITmng2576MakeLikeReactorTest verifier.assertFileNotPresent( "sub-d/target/touch.txt" ); } + /** + * Verify that the project list can also specify aritfact ids. + */ + public void testitMatchesByArtifactId() + throws Exception + { + // as per MNG-4244 + requiresMavenVersion( "[3.0-alpha-3,)" ); + + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2576" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + clean( verifier ); + verifier.getCliOptions().add( "-pl" ); + verifier.getCliOptions().add( ":sub-b" ); + verifier.setLogFileName( "log-artifact-id.txt" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier.assertFileNotPresent( "target/touch.txt" ); + verifier.assertFileNotPresent( "sub-a/target/touch.txt" ); + verifier.assertFilePresent( "sub-b/target/touch.txt" ); + verifier.assertFileNotPresent( "sub-c/target/touch.txt" ); + verifier.assertFileNotPresent( "sub-d/target/touch.txt" ); + } + /** * Verify that reactor is resumed from specified project. */