diff --git a/maven-core-it/it0088/expected-results.txt b/maven-core-it/it0088/expected-results.txt new file mode 100644 index 0000000000..e97e56f118 --- /dev/null +++ b/maven-core-it/it0088/expected-results.txt @@ -0,0 +1 @@ +target/classes/test.properties diff --git a/maven-core-it/it0088/goals.txt b/maven-core-it/it0088/goals.txt new file mode 100644 index 0000000000..9daeafb986 --- /dev/null +++ b/maven-core-it/it0088/goals.txt @@ -0,0 +1 @@ +test diff --git a/maven-core-it/it0088/pom.xml b/maven-core-it/it0088/pom.xml new file mode 100644 index 0000000000..3740b8e77d --- /dev/null +++ b/maven-core-it/it0088/pom.xml @@ -0,0 +1,23 @@ + + 4.0.0 + org.apache.maven.it + maven-core-it0088 + 1.0 + + + junit + junit + 3.8.1 + jar + test + + + + + + src/main/resources + true + + + + diff --git a/maven-core-it/it0088/src/main/resources/test.properties b/maven-core-it/it0088/src/main/resources/test.properties new file mode 100644 index 0000000000..afe1e72856 --- /dev/null +++ b/maven-core-it/it0088/src/main/resources/test.properties @@ -0,0 +1 @@ +project.build.directory = ${project.build.directory} diff --git a/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java b/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java new file mode 100644 index 0000000000..8fa5d4546b --- /dev/null +++ b/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java @@ -0,0 +1,35 @@ +package org.apache.maven.it0088; + +import junit.framework.TestCase; + +import java.util.Properties; +import java.io.File; +import java.io.FileInputStream; + +public class PomInterpolationTest + extends TestCase +{ + private String basedir; + + protected void setUp() + throws Exception + { + basedir = System.getProperty( "basedir" ); + } + + public void testProjectBuildDirectory() + throws Exception + { + Properties testProperties = new Properties(); + + File testPropertiesFile = new File( basedir, "target/classes/test.properties" ); + + assertTrue( testPropertiesFile.exists() ); + + testProperties.load( new FileInputStream( testPropertiesFile ) ); + + File projectBuildDirectory = new File( basedir, "target" ); + + assertEquals( testProperties.getProperty( "project.build.directory" ), projectBuildDirectory.getAbsolutePath() ); + } +}