maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r755194 - in /maven/core-integration-testing/trunk: core-it-suite/src/test/java/org/apache/maven/it/ core-it-suite/src/test/resources/bootstrap/ core-it-suite/src/test/resources/mng-4091/ core-it-suite/src/test/resources/mng-4091/invalid/ c...
Date Tue, 17 Mar 2009 11:27:44 GMT
Author: brett
Date: Tue Mar 17 11:27:43 2009
New Revision: 755194

URL: http://svn.apache.org/viewvc?rev=755194&view=rev
Log:
add a plugin dependency test as well to make sure this doesn't trigger the new validation
errors

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/invalid/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/invalid/pom.xml
  (contents, props changed)
      - copied, changed from r755085, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/plugin-dependency/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/plugin-dependency/pom.xml
  (contents, props changed)
      - copied, changed from r755085, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/
      - copied from r755085, maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java
  (contents, props changed)
      - copied, changed from r755085, maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java
Removed:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/resources/
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4091BadPluginDescriptorTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/bootstrap/pom.xml
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/pom.xml

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4091BadPluginDescriptorTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4091BadPluginDescriptorTest.java?rev=755194&r1=755193&r2=755194&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4091BadPluginDescriptorTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4091BadPluginDescriptorTest.java
Tue Mar 17 11:27:43 2009
@@ -22,6 +22,7 @@
 import java.io.File;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Properties;
 
 import org.apache.maven.it.util.ResourceExtractor;
 
@@ -37,10 +38,10 @@
         super( "[2.1.0,)" ); // only test in 2.1.0+
     }
 
-    public void testitMNG4091()
+    public void testitMNG4091_InvalidDescriptor()
         throws Exception
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4091"
);
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4091/invalid"
);
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
         verifier.setAutoclean( false );
@@ -78,5 +79,21 @@
 
         assertTrue( "User-friendly message was not found in output.", foundMessage );
     }
+
+    public void testitMNG4091_PluginDependency()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4091/plugin-dependency"
);
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        Properties props = verifier.loadProperties( "target/plugin-dependency.properties"
);
+        assertTrue( props.isEmpty() );
+    }
 }
 

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=755194&r1=755193&r2=755194&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
Tue Mar 17 11:27:43 2009
@@ -159,6 +159,12 @@
     </dependency>
     <dependency>
       <groupId>org.apache.maven.its.plugins</groupId>
+      <artifactId>maven-it-plugin-plugin-dependency</artifactId>
+      <version>${itPluginVersion}</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.its.plugins</groupId>
       <artifactId>maven-it-plugin-project-interpolation</artifactId>
       <version>${itPluginVersion}</version>
       <scope>runtime</scope>

Copied: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/invalid/pom.xml
(from r755085, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml)
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/invalid/pom.xml?p2=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/invalid/pom.xml&p1=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml&r1=755085&r2=755194&rev=755194&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/invalid/pom.xml
Tue Mar 17 11:27:43 2009
@@ -27,7 +27,7 @@
   <version>1</version>
   <packaging>pom</packaging>
 
-  <name>MNG-4091 - Profile activation warning test</name>
+  <name>MNG-4091 - Plugin with invalid descriptor test</name>
 
   <build>
     <plugins>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/invalid/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/invalid/pom.xml
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/plugin-dependency/pom.xml
(from r755085, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml)
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/plugin-dependency/pom.xml?p2=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/plugin-dependency/pom.xml&p1=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml&r1=755085&r2=755194&rev=755194&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/pom.xml
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/plugin-dependency/pom.xml
Tue Mar 17 11:27:43 2009
@@ -23,17 +23,17 @@
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.apache.maven.its.mng4091</groupId>
-  <artifactId>plugin-descriptor-test</artifactId>
+  <artifactId>plugin-dependency-descriptor-test</artifactId>
   <version>1</version>
   <packaging>pom</packaging>
 
-  <name>MNG-4091 - Profile activation warning test</name>
+  <name>MNG-4091 - Plugin dependency test</name>
 
   <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.its.plugins</groupId>
-        <artifactId>maven-it-plugin-invalid-descriptor</artifactId>
+        <artifactId>maven-it-plugin-plugin-dependency</artifactId>
         <version>2.1-SNAPSHOT</version>
         <executions>
           <execution>
@@ -42,9 +42,13 @@
             <goals>
               <goal>test</goal>
             </goals>
+            <configuration>
+              <file>target/plugin-dependency.properties</file>
+            </configuration>
           </execution>
         </executions>
       </plugin>
     </plugins>
   </build>
 </project>
+

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/plugin-dependency/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4091/plugin-dependency/pom.xml
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java?rev=755194&r1=755193&r2=755194&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java
(original)
+++ maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/EvalMojo.java
Tue Mar 17 11:27:43 2009
@@ -184,4 +184,9 @@
         getLog().info( "[MAVEN-CORE-IT-LOG] Created output file: " + outputFile );
     }
 
+    public void setOutputFile( File outputFile )
+    {
+        this.outputFile = outputFile;
+    }
 }
+

Modified: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml?rev=755194&r1=755085&r2=755194&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml
(original)
+++ maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/pom.xml
Tue Mar 17 11:27:43 2009
@@ -28,13 +28,18 @@
     <version>2.1-SNAPSHOT</version>
   </parent>
 
-  <artifactId>maven-it-plugin-invalid-descriptor</artifactId>
+  <artifactId>maven-it-plugin-plugin-dependency</artifactId>
   <packaging>maven-plugin</packaging>
 
-  <name>Maven Integration Test Plugin :: Invalid Descriptor</name>
+  <name>Maven Integration Test Plugin :: Plugin Dependency</name>
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.maven.its.plugins</groupId>
+      <artifactId>maven-it-plugin-expression</artifactId>
+      <version>2.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>2.0</version>
@@ -46,15 +51,5 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
-
-  <build>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <!-- forces overwrite of generated one -->
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-  </build>
 </project>
 

Copied: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java
(from r755085, maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java)
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java?p2=maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java&p1=maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java&r1=755085&r2=755194&rev=755194&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-invalid-descriptor/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java
(original)
+++ maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java
Tue Mar 17 11:27:43 2009
@@ -19,21 +19,34 @@
  * under the License.
  */
 
-import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+import java.io.File;
 
 /**
  * @goal test
  *
  * @phase process-sources
  */
-public class CoreItMojo
-    extends AbstractMojo
+public class DerivedItMojo
+    extends EvalMojo
 {
+    /**
+     * The path to the output file for the properties with the expression values. For each
expression given by the
+     * parameter {@link #expressions} an similar named properties key will be used to save
the expression value. If an
+     * expression evaluated to <code>null</code>, there will be no corresponding
key in the properties file.
+     * 
+     * @parameter
+     */
+    private File file;
+
     public void execute()
-        throws MojoExecutionException
+        throws MojoFailureException, MojoExecutionException
     {
-        throw new MojoExecutionException( "Should not be run" );
+        super.setOutputFile( file );
+
+        super.execute();
     }
 
 }

Propchange: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-plugin-dependency/src/main/java/org/apache/maven/plugin/coreit/DerivedItMojo.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/core-it-plugins/pom.xml?rev=755194&r1=755193&r2=755194&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-support/core-it-plugins/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-support/core-it-plugins/pom.xml Tue Mar 17
11:27:43 2009
@@ -47,6 +47,7 @@
     <module>maven-it-plugin-no-project</module>
     <module>maven-it-plugin-packaging</module>
     <module>maven-it-plugin-parameter-implementation</module>
+    <module>maven-it-plugin-plugin-dependency</module>
     <module>maven-it-plugin-project-interpolation</module>
     <module>maven-it-plugin-setter</module>
     <module>maven-it-plugin-site</module>



Mime
View raw message