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 2010/08/09 18:29:49 UTC

svn commit: r983716 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-4363/ resources/mng-4363/repo/ resources/mng-4363/repo/org/ resources/mng-4363/repo/org/apache/ resources/mng-4363/repo/org/a...

Author: bentmann
Date: Mon Aug  9 16:29:48 2010
New Revision: 983716

URL: http://svn.apache.org/viewvc?rev=983716&view=rev
Log:
o Extended IT to better match real life and check interaction with static dependencies

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.jar   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.pom
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.jar   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.pom
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.jar   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.pom
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/settings-template.xml   (with props)
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4363DynamicAdditionOfDependencyArtifactTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/pom.xml

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4363DynamicAdditionOfDependencyArtifactTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4363DynamicAdditionOfDependencyArtifactTest.java?rev=983716&r1=983715&r2=983716&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4363DynamicAdditionOfDependencyArtifactTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4363DynamicAdditionOfDependencyArtifactTest.java Mon Aug  9 16:29:48 2010
@@ -51,12 +51,18 @@ public class MavenITmng4363DynamicAdditi
         Verifier verifier = newVerifier( testDir.getAbsolutePath() );
         verifier.setAutoclean( false );
         verifier.deleteDirectory( "target" );
-        verifier.executeGoal( "initialize" );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng4363" );
+        verifier.getCliOptions().add( "-s" );
+        verifier.getCliOptions().add( "settings.xml" );
+        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
+        verifier.executeGoal( "generate-sources" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
         List classpath = verifier.loadLines( "target/classpath.txt", "UTF-8" );
-        assertTrue( classpath.toString(), classpath.contains( "maven-core-it-support-1.0.jar" ) );
+        assertTrue( classpath.toString(), classpath.contains( "a-0.1.jar" ) );
+        assertTrue( classpath.toString(), classpath.contains( "b-0.1.jar" ) );
+        assertTrue( classpath.toString(), classpath.contains( "c-0.1.jar" ) );
     }
 
 }

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/pom.xml?rev=983716&r1=983715&r2=983716&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/pom.xml Mon Aug  9 16:29:48 2010
@@ -32,6 +32,16 @@ under the License.
     be resolved and added to the affected class paths for later goal executions.
   </description>
 
+  <dependencies>
+    <!-- static dependency (with transitive dependency) -->
+    <dependency>
+      <groupId>org.apache.maven.its.mng4363</groupId>
+      <artifactId>b</artifactId>
+      <version>0.1</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+
   <build>
     <plugins>
       <plugin>
@@ -40,20 +50,31 @@ under the License.
         <version>2.1-SNAPSHOT</version>
         <executions>
           <execution>
-            <id>cobertura</id>
+            <id>compile</id>
             <phase>validate</phase>
             <goals>
+              <goal>compile</goal>
+            </goals>
+            <configuration>
+              <compileClassPath>target/classpath-orig.txt</compileClassPath>
+              <significantPathLevels>1</significantPathLevels>
+            </configuration>
+          </execution>
+          <execution>
+            <id>cobertura</id>
+            <phase>initialize</phase>
+            <goals>
               <goal>inject</goal>
             </goals>
             <configuration>
               <artifacts>
-                <artifact>org.apache.maven.its:maven-core-it-support</artifact>
+                <artifact>org.apache.maven.its.mng4363:c</artifact>
               </artifacts>
             </configuration>
           </execution>
           <execution>
             <id>surefire</id>
-            <phase>initialize</phase>
+            <phase>generate-sources</phase>
             <goals>
               <goal>compile</goal>
             </goals>
@@ -64,10 +85,11 @@ under the License.
           </execution>
         </executions>
         <dependencies>
+          <!-- dynamic dependency injected by plugin -->
           <dependency>
-            <groupId>org.apache.maven.its</groupId>
-            <artifactId>maven-core-it-support</artifactId>
-            <version>1.0</version>
+            <groupId>org.apache.maven.its.mng4363</groupId>
+            <artifactId>c</artifactId>
+            <version>0.1</version>
           </dependency>
         </dependencies>
       </plugin>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.jar?rev=983716&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.pom
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.pom?rev=983716&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.pom (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/a/0.1/a-0.1.pom Mon Aug  9 16:29:48 2010
@@ -0,0 +1,36 @@
+<?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>
+
+  <groupId>org.apache.maven.its.mng4363</groupId>
+  <artifactId>a</artifactId>
+  <version>0.1</version>
+  <packaging>jar</packaging>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+</project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.jar?rev=983716&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.pom
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.pom?rev=983716&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.pom (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/b/0.1/b-0.1.pom Mon Aug  9 16:29:48 2010
@@ -0,0 +1,44 @@
+<?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>
+
+  <groupId>org.apache.maven.its.mng4363</groupId>
+  <artifactId>b</artifactId>
+  <version>0.1</version>
+  <packaging>jar</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.mng4363</groupId>
+      <artifactId>a</artifactId>
+      <version>0.1</version>
+    </dependency>
+  </dependencies>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+</project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.jar?rev=983716&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.pom
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.pom?rev=983716&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.pom (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/repo/org/apache/maven/its/mng4363/c/0.1/c-0.1.pom Mon Aug  9 16:29:48 2010
@@ -0,0 +1,36 @@
+<?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>
+
+  <groupId>org.apache.maven.its.mng4363</groupId>
+  <artifactId>c</artifactId>
+  <version>0.1</version>
+  <packaging>jar</packaging>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+</project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/settings-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/settings-template.xml?rev=983716&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/settings-template.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/settings-template.xml Mon Aug  9 16:29:48 2010
@@ -0,0 +1,55 @@
+<?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.
+-->
+
+<settings>
+  <profiles>
+    <profile>
+      <id>maven-core-it-repo</id>
+      <repositories>
+        <repository>
+          <id>maven-core-it</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>maven-core-it</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+</settings>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/settings-template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4363/settings-template.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision