From 4ceb08bc18d2060165cc4790a30279d22922753f Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Fri, 3 Oct 2008 19:44:17 +0000 Subject: [PATCH] o Decoupled it0102 from production plugins git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@701511 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/it/MavenIT0102Test.java | 23 +++--- .../src/test/resources/it0102/pom.xml | 75 ++++++++----------- .../src/test/verifier/verifications.xml | 12 --- 3 files changed, 42 insertions(+), 68 deletions(-) delete mode 100644 its/core-it-suite/src/test/resources/it0102/src/test/verifier/verifications.xml diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java index 13a23e17d7..7d760812c3 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java @@ -23,8 +23,7 @@ import org.apache.maven.it.Verifier; import org.apache.maven.it.util.ResourceExtractor; import java.io.File; -import java.util.ArrayList; -import java.util.List; +import java.util.Properties; public class MavenIT0102Test extends AbstractMavenIntegrationTestCase @@ -41,18 +40,18 @@ public class MavenIT0102Test Verifier verifier = new Verifier( testDir.getAbsolutePath() ); - List options = new ArrayList(); - options.add( "-Doutput=" + new File( testDir, "target/effective-pom.txt" ).getAbsolutePath() ); - - verifier.setCliOptions( options ); - - List goals = new ArrayList(); - goals.add( "org.apache.maven.plugins:maven-help-plugin:2.0.2:effective-pom" ); - goals.add( "verify" ); - + Properties systemProperties = new Properties(); + systemProperties.put( "expression.expressions", "project/properties" ); + verifier.setSystemProperties( systemProperties ); + verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-expression::eval" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); + verifier.assertFilePresent( "target/expression.properties" ); + Properties props = verifier.loadProperties( "target/expression.properties" ); + assertNull( props.getProperty( "project.properties.it0102.testOutput" ) ); + assertEquals( "Success", props.getProperty( "project.properties.testOutput" ) ); + assertEquals( "Present", props.getProperty( "project.properties.profilesXmlValue" ) ); } -} +} diff --git a/its/core-it-suite/src/test/resources/it0102/pom.xml b/its/core-it-suite/src/test/resources/it0102/pom.xml index 98aeca97d7..671d9695f5 100644 --- a/its/core-it-suite/src/test/resources/it0102/pom.xml +++ b/its/core-it-suite/src/test/resources/it0102/pom.xml @@ -1,51 +1,37 @@ - + + + + + 4.0.0 - Maven Integration Test :: it0102 + org.apache.maven.its.it0102 maven-it-it0102 - Test that <activeByDefault/> calculations for profile activation only - use profiles defined in the POM. [MNG-2136] - pom 1.0 - - - - - maven-antrun-plugin - - - validate - - - value from external profile: ${profilesXmlValue} - test output: ${testOutput} - - - - run - - - - - - + pom + + Maven Integration Test :: it0102 + + Test that <activeByDefault/> calculations for profile activation only + use profiles defined in the POM. [MNG-2136] + @@ -55,6 +41,7 @@ Failure + Failure diff --git a/its/core-it-suite/src/test/resources/it0102/src/test/verifier/verifications.xml b/its/core-it-suite/src/test/resources/it0102/src/test/verifier/verifications.xml deleted file mode 100644 index af46897f46..0000000000 --- a/its/core-it-suite/src/test/resources/it0102/src/test/verifier/verifications.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - target/effective-pom.txt - value from external profile: Present - - - target/effective-pom.txt - test output: Success - - -