You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/05/07 17:40:21 UTC

svn commit: r1335070 - in /maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin: ./ src/it/annotation-with-inheritance/ src/it/annotation-with-inheritance/src/main/java/org/apache/maven/plugin/coreit/ src/it/annotation-with-inheritance/src/main/...

Author: olamy
Date: Mon May  7 15:40:20 2012
New Revision: 1335070

URL: http://svn.apache.org/viewvc?rev=1335070&view=rev
Log:
improve it

Added:
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/maven/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/maven/lifecycle.xml   (with props)
Modified:
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/invoker.properties
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml?rev=1335070&r1=1335069&r2=1335070&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml Mon May  7 15:40:20 2012
@@ -59,9 +59,9 @@
   </distributionManagement>
 
   <properties>
-    <mavenVersion>2.0.6</mavenVersion>
     <doxiaVersion>1.2</doxiaVersion>
     <doxia-sitetoolsVersion>1.2</doxia-sitetoolsVersion>
+    <mavenVersion>2.0.6</mavenVersion>
     <it.debug>true</it.debug>
   </properties>
 

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/invoker.properties?rev=1335070&r1=1335069&r2=1335070&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/invoker.properties (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/invoker.properties Mon May  7 15:40:20 2012
@@ -1,5 +1,6 @@
 invoker.goals.1 = install
 invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0:it0014
+invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0:first
 #FIXME disabled need to find a solution for the chicken and eggs issue.
 #help sources are generated @generated-sources but need descriptor which need compile phase first for classes scanning
 #invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0::help

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml?rev=1335070&r1=1335069&r2=1335070&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml Mon May  7 15:40:20 2012
@@ -45,6 +45,11 @@ under the License.
       <version>2.0</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>@mavenVersion@</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java?rev=1335070&r1=1335069&r2=1335070&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java Mon May  7 15:40:20 2012
@@ -19,7 +19,6 @@ package org.apache.maven.plugin.coreit;
  * under the License.
  */
 
-import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Execute;
@@ -27,8 +26,6 @@ import org.apache.maven.plugins.annotati
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 
-import java.io.File;
-
 /**
  * Touches a test file.
  *
@@ -48,12 +45,20 @@ public class FirstMojo
     @Parameter( alias = "alias" )
     private String aliasedParam;
 
-    @Component( role = "org.apache.maven.project.MavenProjectHelper", roleHint = "test" )
+    @Component( role = "org.apache.maven.project.MavenProjectHelper", roleHint = "default" )
     private Object projectHelper;
 
     public void execute()
         throws MojoExecutionException
     {
+        if ( projectHelper == null )
+        {
+            throw new MojoExecutionException( "projectHelper == null" );
+        }
+        if (basedir == null || touchFile == null)
+        {
+            throw new MojoExecutionException( "basedir == null || touchFile == null" );
+        }
     }
 
 }

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/maven/lifecycle.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/maven/lifecycle.xml?rev=1335070&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/maven/lifecycle.xml (added)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/maven/lifecycle.xml Mon May  7 15:40:20 2012
@@ -0,0 +1,17 @@
+<lifecycles>
+  <lifecycle>
+    <id>cobertura</id>
+    <phases>
+      <phase>
+        <id>process-classes</id>
+      </phase>
+      <phase>
+        <id>test</id>
+        <configuration>
+          <classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
+          <testFailureIgnore>true</testFailureIgnore>
+        </configuration>
+      </phase>
+    </phases>
+  </lifecycle>
+</lifecycles>
\ No newline at end of file

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/maven/lifecycle.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/resources/META-INF/maven/lifecycle.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy?rev=1335070&r1=1335069&r2=1335070&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy Mon May  7 15:40:20 2012
@@ -35,7 +35,7 @@ assert mojo.configuration.touchFile[0].'
 assert mojo.requirements.requirement.size() == 1
 
 assert mojo.requirements.requirement[0].role.text() == 'org.apache.maven.project.MavenProjectHelper'
-assert mojo.requirements.requirement[0].'role-hint'.text() == 'test'
+assert mojo.requirements.requirement[0].'role-hint'.text() == 'default'
 assert mojo.requirements.requirement[0].'field-name'.text() == 'projectHelper'
 
 assert mojo.parameters.parameter.size() == 3