diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java index 0597e0c936..589dea7de7 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java @@ -23,6 +23,7 @@ import org.apache.maven.it.Verifier; import org.apache.maven.it.util.ResourceExtractor; import java.io.File; +import java.util.Properties; public class MavenIT0104Test extends AbstractMavenIntegrationTestCase @@ -36,10 +37,22 @@ public class MavenIT0104Test { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0104" ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); - verifier.executeGoal( "test" ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); + Properties props = verifier.loadProperties( "target/config.properties" ); + assertEquals( new File( testDir, "target" ), new File( props.getProperty( "stringParam" ) ) ); + assertEquals( "4.0.0", props.getProperty( "domParam.children.modelVersion.0.value" ) ); + assertEquals( "org.apache.maven.its.it0104", props.getProperty( "domParam.children.groupId.0.value" ) ); + assertEquals( "1.0-SNAPSHOT", props.getProperty( "domParam.children.version.0.value" ) ); + assertEquals( "jar", props.getProperty( "domParam.children.packaging.0.value" ) ); + assertEquals( "http://maven.apache.org", props.getProperty( "domParam.children.url.0.value" ) ); + assertEquals( "Apache", props.getProperty( "domParam.children.organization.0.children.name.0.value" ) ); + assertEquals( new File( testDir, "target" ), new File( props.getProperty( "domParam.children.build.0.children.directory.0.value" ) ) ); + assertEquals( new File( testDir, "target/classes" ), new File( props.getProperty( "domParam.children.build.0.children.outputDirectory.0.value" ) ) ); } -} +} diff --git a/its/core-it-suite/src/test/resources/it0104/pom.xml b/its/core-it-suite/src/test/resources/it0104/pom.xml index 13605c0c43..55abdc917e 100644 --- a/its/core-it-suite/src/test/resources/it0104/pom.xml +++ b/its/core-it-suite/src/test/resources/it0104/pom.xml @@ -1,44 +1,41 @@ - + + + + + 4.0.0 - Maven Integration Test :: it0104 + org.apache.maven.its.it0104 - maven-it-it0104 + test + 1.0-SNAPSHOT + jar + + Maven Integration Test :: it0104 Verify that plugin configurations are interpolated correctly. + Apache - jar - 1.0-SNAPSHOT http://maven.apache.org - - - - test-plugins - http://people.apache.org/repo/m2-snapshot-repository/ - false - true - - - - - test-plugins - http://people.apache.org/repo/m2-snapshot-repository/ - false - true - - - - - - junit - junit - 3.8.1 - test - - @@ -48,8 +45,9 @@ maven-it-plugin-configuration 2.1-SNAPSHOT - ${project.build.directory} - + ${project.build.directory}/config.properties + ${project.build.directory} + ${basedir} ${project.modelVersion} ${project.name} @@ -65,7 +63,7 @@ ${project.build.directory} ${project.build.outputDirectory} - + @@ -81,7 +79,7 @@ org.apache.maven.its.plugins maven-it-plugin-configuration - + diff --git a/its/core-it-suite/src/test/resources/it0104/src/main/java/org/apache/maven/it/App.java b/its/core-it-suite/src/test/resources/it0104/src/main/java/org/apache/maven/it/App.java deleted file mode 100644 index 2659fcfc52..0000000000 --- a/its/core-it-suite/src/test/resources/it0104/src/main/java/org/apache/maven/it/App.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.apache.maven.it; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -}