You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/01/16 23:14:52 UTC

svn commit: r735158 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-0249/ resources/mng-0249/test-component-a/ resources/mng-0249/test-component-a/classes/ resources/mng-0249/test-component-a/s...

Author: bentmann
Date: Fri Jan 16 14:14:51 2009
New Revision: 735158

URL: http://svn.apache.org/viewvc?rev=735158&view=rev
Log:
o Decoupled mng-0249 from production plugins

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/classes/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/classes/test.properties   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/classes/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/classes/test.properties   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/classes/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/classes/test.properties   (with props)
Removed:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/src/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/src/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/src/
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0249ResolveDepsFromReactorTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/pom.xml
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/pom.xml
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/pom.xml
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/pom.xml

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0249ResolveDepsFromReactorTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0249ResolveDepsFromReactorTest.java?rev=735158&r1=735157&r2=735158&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0249ResolveDepsFromReactorTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0249ResolveDepsFromReactorTest.java Fri Jan 16 14:14:51 2009
@@ -23,6 +23,7 @@
 import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
+import java.util.List;
 
 /**
  * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-249">MNG-249</a>.
@@ -35,24 +36,33 @@
 {
 
     /**
-     * Test that the reactor can establish the artifact location of known projects for dependencies
+     * Test that the reactor can establish the artifact location of known projects for dependencies.
      */
-    public void testitMNG249()
+    public void testitMNG0249()
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0249" );
+
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "package" );
-        verifier.assertFilePresent( "test-component-a/target/test-component-a-0.1.jar" );
-        verifier.assertFilePresent( "test-component-b/target/test-component-b-0.1.jar" );
-        verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1.war" );
-        verifier.assertFilePresent(
-            "test-component-c/target/test-component-c-0.1.war!/WEB-INF/lib/test-component-a-0.1.jar" );
-        verifier.assertFilePresent(
-            "test-component-c/target/test-component-c-0.1.war!/WEB-INF/lib/test-component-b-0.1.jar" );
+        verifier.setAutoclean( false );
+        verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
+        List ccp = verifier.loadLines( "test-component-c/target/compile.txt", "UTF-8" );
+        assertTrue( ccp.toString(), ccp.contains( "test-component-c/classes" ) );
+        assertTrue( ccp.toString(), ccp.contains( "test-component-b/classes" ) );
+        assertTrue( ccp.toString(), ccp.contains( "test-component-a/classes" ) );
+
+        List rcp = verifier.loadLines( "test-component-c/target/runtime.txt", "UTF-8" );
+        assertTrue( rcp.toString(), rcp.contains( "test-component-c/classes" ) );
+        assertTrue( rcp.toString(), rcp.contains( "test-component-b/classes" ) );
+        assertTrue( rcp.toString(), rcp.contains( "test-component-a/classes" ) );
+
+        List tcp = verifier.loadLines( "test-component-c/target/test.txt", "UTF-8" );
+        assertTrue( tcp.toString(), tcp.contains( "test-component-c/classes" ) );
+        assertTrue( tcp.toString(), tcp.contains( "test-component-b/classes" ) );
+        assertTrue( tcp.toString(), tcp.contains( "test-component-a/classes" ) );
     }
-}
 
+}

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/pom.xml?rev=735158&r1=735157&r2=735158&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/pom.xml Fri Jan 16 14:14:51 2009
@@ -1,11 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <project>
   <modelVersion>4.0.0</modelVersion>
-  <name>Maven Integration Test :: it0042</name> 
-  <groupId>org.apache.maven.its.it0042</groupId>
-  <artifactId>maven-it-it0042</artifactId>
-  <description>Test that the reactor can establish the artifact location of known projects for dependencies</description>
+
+  <groupId>org.apache.maven.its.mng0249</groupId>
+  <artifactId>parent</artifactId>
   <version>0.1</version>
   <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-249</name> 
+  <description>Test that the reactor can establish the artifact location of known projects for dependencies</description>
+
   <modules>
     <module>test-component-c</module>
     <module>test-component-b</module>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/classes/test.properties
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/classes/test.properties?rev=735158&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/classes/test.properties (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/classes/test.properties Fri Jan 16 14:14:51 2009
@@ -0,0 +1 @@
+key = value

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/classes/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/classes/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/pom.xml?rev=735158&r1=735157&r2=735158&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-a/pom.xml Fri Jan 16 14:14:51 2009
@@ -1,12 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <project>
   <modelVersion>4.0.0</modelVersion>
-        <parent>
-                <artifactId>maven-it-it0042</artifactId>
-                <groupId>org.apache.maven.its.it0042</groupId>
-                <version>0.1</version>
-        </parent>
+
+  <parent>
+    <groupId>org.apache.maven.its.mng0249</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.1</version>
+  </parent>
+
   <artifactId>test-component-a</artifactId>
   <version>0.1</version>
-  <name>Test Component A</name>
   <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: MNG-249 :: Test Component A</name>
+
+  <build>
+    <outputDirectory>classes</outputDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-artifact</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <!--
+            NOTE: This mimics the Maven Compiler Plugin which would normally set the output directory as the
+            project's artifact file.
+            -->
+            <id>compile</id>
+            <phase>validate</phase>
+            <configuration>
+              <mainFile>classes</mainFile>
+            </configuration>
+            <goals>
+              <goal>set</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/classes/test.properties
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/classes/test.properties?rev=735158&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/classes/test.properties (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/classes/test.properties Fri Jan 16 14:14:51 2009
@@ -0,0 +1 @@
+key = value

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/classes/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/classes/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/pom.xml?rev=735158&r1=735157&r2=735158&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-b/pom.xml Fri Jan 16 14:14:51 2009
@@ -1,19 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <project>
   <modelVersion>4.0.0</modelVersion>
-        <parent>
-                <artifactId>maven-it-it0042</artifactId>
-                <groupId>org.apache.maven.its.it0042</groupId>
-                <version>0.1</version>
-        </parent>
+
+  <parent>
+    <groupId>org.apache.maven.its.mng0249</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.1</version>
+  </parent>
+
   <artifactId>test-component-b</artifactId>
   <version>0.1</version>
-  <name>Test Component B</name>
   <packaging>jar</packaging>
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.maven.its.it0042</groupId>
-			<artifactId>test-component-a</artifactId>
-			<version>0.1</version>
-		</dependency>
-	</dependencies>
+
+  <name>Maven Integration Test :: MNG-249 :: Test Component B</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.mng0249</groupId>
+      <artifactId>test-component-a</artifactId>
+      <version>0.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <outputDirectory>classes</outputDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-artifact</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <!--
+            NOTE: This mimics the Maven Compiler Plugin which would normally set the output directory as the
+            project's artifact file.
+            -->
+            <id>compile</id>
+            <phase>validate</phase>
+            <configuration>
+              <mainFile>classes</mainFile>
+            </configuration>
+            <goals>
+              <goal>set</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/classes/test.properties
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/classes/test.properties?rev=735158&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/classes/test.properties (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/classes/test.properties Fri Jan 16 14:14:51 2009
@@ -0,0 +1 @@
+key = value

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/classes/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/classes/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/pom.xml?rev=735158&r1=735157&r2=735158&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0249/test-component-c/pom.xml Fri Jan 16 14:14:51 2009
@@ -1,20 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <project>
   <modelVersion>4.0.0</modelVersion>
-        <parent>
-                <artifactId>maven-it-it0042</artifactId>
-                <groupId>org.apache.maven.its.it0042</groupId>
-                <version>0.1</version>
-        </parent>
+
+  <parent>
+    <groupId>org.apache.maven.its.mng0249</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.1</version>
+  </parent>
 
   <artifactId>test-component-c</artifactId>
   <version>0.1</version>
-  <name>Test Component C</name>
-  <packaging>war</packaging>
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.maven.its.it0042</groupId>
-			<artifactId>test-component-b</artifactId>
-			<version>0.1</version>
-		</dependency>
-	</dependencies>
+  <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: MNG-249 :: Test Component C</name>
+
+  <dependencies>
+    <dependency>
+      <!-- NOTE: This does not only require to resolve the classes/JARs but also the POM to get its dependencies -->
+      <groupId>org.apache.maven.its.mng0249</groupId>
+      <artifactId>test-component-b</artifactId>
+      <version>0.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <outputDirectory>classes</outputDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-artifact</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <!--
+            NOTE: This mimics the Maven Compiler Plugin which would normally set the output directory as the
+            project's artifact file.
+            -->
+            <id>compile</id>
+            <phase>validate</phase>
+            <configuration>
+              <mainFile>classes</mainFile>
+            </configuration>
+            <goals>
+              <goal>set</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>resolve</id>
+            <phase>validate</phase>
+            <configuration>
+              <compileClassPath>target/compile.txt</compileClassPath>
+              <runtimeClassPath>target/runtime.txt</runtimeClassPath>
+              <testClassPath>target/test.txt</testClassPath>
+              <significantPathLevels>2</significantPathLevels>
+            </configuration>
+            <goals>
+              <goal>compile</goal>
+              <goal>runtime</goal>
+              <goal>test</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>