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 2008/10/11 19:10:22 UTC

svn commit: r703686 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/MavenIT0086Test.java resources/bootstrap/pom.xml resources/it0086/pom.xml

Author: bentmann
Date: Sat Oct 11 10:10:21 2008
New Revision: 703686

URL: http://svn.apache.org/viewvc?rev=703686&view=rev
Log:
o Decoupled it0086 from production dependency

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

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0086Test.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0086Test.java?rev=703686&r1=703685&r2=703686&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0086Test.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0086Test.java Sat Oct 11 10:10:21 2008
@@ -23,13 +23,14 @@
 import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
+import java.util.Properties;
 
 public class MavenIT0086Test
     extends AbstractMavenIntegrationTestCase
 {
 
     /**
-     * Verify that a plugin dependency class can be loaded from both the plugin classloader and the
+     * Verify that a plugin dependency class/resource can be loaded from both the plugin classloader and the
      * context classloader available to the plugin.
      */
     public void testit0086()
@@ -37,11 +38,26 @@
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0086" );
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.deleteArtifact( "org.apache.maven.plugins", "maven-it-it-plugin", "1.0", "maven-plugin" );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
         verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
+        Properties pclProps = verifier.loadProperties( "target/pcl.properties" );
+        assertNotNull( pclProps.getProperty( "org.apache.maven.plugin.coreit.ClassA" ) );
+        assertNotNull( pclProps.getProperty( "org.apache.maven.plugin.coreit.ClassB" ) );
+        assertNotNull( pclProps.getProperty( "org.apache.maven.plugin.coreit.SomeClass" ) );
+        assertEquals( "methodB", pclProps.getProperty( "org.apache.maven.plugin.coreit.SomeClass.methods" ) );
+        assertNotNull( pclProps.getProperty( "org/apache/maven/plugin/coreit/a.properties" ) );
+        assertEquals( "1", pclProps.getProperty( "org/apache/maven/plugin/coreit/a.properties.count" ) );
+        assertNotNull( pclProps.getProperty( "org/apache/maven/plugin/coreit/b.properties" ) );
+        assertEquals( "1", pclProps.getProperty( "org/apache/maven/plugin/coreit/b.properties.count" ) );
+        assertNotNull( pclProps.getProperty( "org/apache/maven/plugin/coreit/it.properties" ) );
+        assertEquals( "2", pclProps.getProperty( "org/apache/maven/plugin/coreit/it.properties.count" ) );
+
+        Properties tcclProps = verifier.loadProperties( "target/tccl.properties" );
+        assertEquals( pclProps, tcclProps );
     }
-}
 
+}

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/bootstrap/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/bootstrap/pom.xml?rev=703686&r1=703685&r2=703686&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/bootstrap/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/bootstrap/pom.xml Sat Oct 11 10:10:21 2008
@@ -74,109 +74,115 @@
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-artifact</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.its.plugins</groupId>
+      <artifactId>maven-it-plugin-class-loader</artifactId>
+      <version>${itPluginVersion}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-configuration</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-context-passing</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-dependency-resolution</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-expression</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-file</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-fork</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-generate-envar-properties</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-generate-properties</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-loadable</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-no-project</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-packaging</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-parameter-implementation</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-project-interpolation</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-setter</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-touch</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-uses-properties</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-uses-wagon</artifactId>
       <version>${itPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
 
     <!-- stub plugins in alphabetical order -->
@@ -184,91 +190,91 @@
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-clean-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-deploy-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-ear-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-ejb-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-install-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-jar-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-javadoc-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-plugin-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-rar-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-resources-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-site-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-source-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-surefire-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-war-plugin</artifactId>
       <version>${stubPluginVersion}</version>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>
   </dependencies>
 </project>

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0086/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0086/pom.xml?rev=703686&r1=703685&r2=703686&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0086/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0086/pom.xml Sat Oct 11 10:10:21 2008
@@ -1,44 +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.
+-->
+
 <project>
   <modelVersion>4.0.0</modelVersion>
-  <name>Maven Integration Test :: it0086</name> 
+
   <groupId>org.apache.maven.its.it0086</groupId>
-  <version>1.0</version>
   <artifactId>maven-it-it0086</artifactId>
-  <description>Verify that a plugin dependency class can be loaded from both the plugin classloader and the context classloader available to the plugin.</description>
-  
-  <repositories>
-    <repository>
-      <id>test-plugins</id>
-      <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
-      <releases><enabled>false</enabled></releases>
-      <snapshots><enabled>true</enabled></snapshots>
-    </repository>
-  </repositories>
-  <pluginRepositories>
-    <pluginRepository>
-      <id>test-plugins</id>
-      <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
-      <releases><enabled>false</enabled></releases>
-      <snapshots><enabled>true</enabled></snapshots>
-    </pluginRepository>
-  </pluginRepositories>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: it0086</name> 
+  <description>
+    Verify that a plugin dependency class can be loaded from both the plugin classloader and the context classloader
+    available to the plugin.
+  </description>
   
   <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.its.plugins</groupId>
-        <artifactId>maven-it-plugin-loadable</artifactId>
+        <artifactId>maven-it-plugin-class-loader</artifactId>
         <version>2.1-SNAPSHOT</version>
         <executions>
           <execution>
+            <id>load</id>
             <phase>validate</phase>
             <configuration>
-              <className>
-                bsh.Interpreter
-              </className>
+              <classNames>org.apache.maven.plugin.coreit.ClassA,org.apache.maven.plugin.coreit.ClassB,org.apache.maven.plugin.coreit.SomeClass</classNames>
+              <resourcePaths>org/apache/maven/plugin/coreit/a.properties,org/apache/maven/plugin/coreit/b.properties,org/apache/maven/plugin/coreit/it.properties</resourcePaths>
+              <pluginClassLoaderOutput>target/pcl.properties</pluginClassLoaderOutput>
+              <contextClassLoaderOutput>target/tccl.properties</contextClassLoaderOutput>
             </configuration>
             <goals>
-              <goal>loadable</goal>
+              <goal>load</goal>
             </goals>
           </execution>
         </executions>