maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r732118 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/MavenIT0072Test.java resources/it0072/pom.xml
Date Tue, 06 Jan 2009 21:02:20 GMT
Author: bentmann
Date: Tue Jan  6 13:02:19 2009
New Revision: 732118

URL: http://svn.apache.org/viewvc?rev=732118&view=rev
Log:
o Decoupled it0072 from production plugins

Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0072Test.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0072/pom.xml

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0072Test.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0072Test.java?rev=732118&r1=732117&r2=732118&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0072Test.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0072Test.java
Tue Jan  6 13:02:19 2009
@@ -23,6 +23,7 @@
 import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
+import java.util.Properties;
 
 /**
  * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-885">MNG-885</a>.
@@ -42,12 +43,16 @@
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0072" );
+
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "package" );
-        verifier.assertFilePresent( "target/maven-it-it0072-1.0-SNAPSHOT.jar" );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
+        Properties props = verifier.loadProperties( "target/pom.properties" );
+        assertEquals( "1.0-SNAPSHOT", props.getProperty( "project.version" ) );
     }
-}
 
+}

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0072/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0072/pom.xml?rev=732118&r1=732117&r2=732118&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0072/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0072/pom.xml Tue
Jan  6 13:02:19 2009
@@ -1,24 +1,43 @@
 <project>
   <modelVersion>4.0.0</modelVersion>
-  <name>Maven Integration Test :: it0072</name> 
+
   <groupId>org.apache.maven.its.it0072</groupId>
   <artifactId>maven-it-it0072</artifactId>
-  <description>Verifies that property references with dotted notation work within
-        POM interpolation.</description>
-  <packaging>jar</packaging>
+  <!-- interpolate here -->
   <version>${m2.version}</version>
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <type>jar</type>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+  <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: it0072</name> 
+  <description>
+    Verifies that property references with dotted notation work within POM interpolation.
+  </description>
 
   <properties>
-    <m2.foo>foo2</m2.foo>
     <m2.version>1.0-SNAPSHOT</m2.version>
   </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-expression</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <outputFile>target/pom.properties</outputFile>
+          <expressions>
+            <expression>project/version</expression>
+          </expressions>
+        </configuration>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>eval</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>



Mime
View raw message