You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2012/06/24 22:59:39 UTC

svn commit: r1353331 - in /maven/plugin-tools/trunk: maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/ maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/ maven-plugin-plugin/src/it/annotation-with-inheritance-r...

Author: hboutemy
Date: Sun Jun 24 20:59:37 2012
New Revision: 1353331

URL: http://svn.apache.org/viewvc?rev=1353331&view=rev
Log:
[MPLUGIN-216] fixed default dependency resolution value as none for java 5 annotations

Modified:
    maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Mojo.java
    maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/ResolutionScope.java
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/verify.groovy
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic-annotations/verify.groovy
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/datamodel/MojoAnnotationContent.java

Modified: maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Mojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Mojo.java?rev=1353331&r1=1353330&r2=1353331&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Mojo.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Mojo.java Sun Jun 24 20:59:37 2012
@@ -54,13 +54,13 @@ public @interface Mojo
      * the required dependency resolution scope.
      * @return 
      */
-    ResolutionScope requiresDependencyResolution() default ResolutionScope.RUNTIME;
+    ResolutionScope requiresDependencyResolution() default ResolutionScope.NONE;
 
     /**
      * the required dependency collection scope.
      * @return 
      */
-    ResolutionScope requiresDependencyCollection() default ResolutionScope.RUNTIME;
+    ResolutionScope requiresDependencyCollection() default ResolutionScope.NONE;
 
     /**
      * your Mojo instantiation strategy. (Only <code>per-lookup</code> and <code>singleton</code> are supported)

Modified: maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/ResolutionScope.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/ResolutionScope.java?rev=1353331&r1=1353330&r2=1353331&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/ResolutionScope.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/ResolutionScope.java Sun Jun 24 20:59:37 2012
@@ -31,6 +31,10 @@ import org.apache.maven.artifact.Artifac
 public enum ResolutionScope
 {
     /**
+     * empty resolution scope
+     */
+    NONE( null ),
+    /**
      * <code>compile</code> resolution scope
      * = <code>compile</code> + <code>system</code> + <code>provided</code> dependencies
      */

Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy?rev=1353331&r1=1353330&r2=1353331&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy Sun Jun 24 20:59:37 2012
@@ -18,7 +18,7 @@ assert mojo.language.text() == 'java'
 assert mojo.description.text() == 'Touches a test file.'
 assert mojo.deprecated.text() == "Don't use!"
 assert mojo.requiresDependencyResolution.text() == 'test'
-assert mojo.requiresDependencyCollection.text() == 'runtime'
+assert mojo.requiresDependencyCollection.text() == ''
 assert mojo.requiresProject.text() == 'true'
 assert mojo.requiresOnline.text() == 'false'
 assert mojo.requiresDirectInvocation.text() == 'false'

Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/verify.groovy?rev=1353331&r1=1353330&r2=1353331&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/verify.groovy (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/verify.groovy Sun Jun 24 20:59:37 2012
@@ -16,7 +16,7 @@ assert mojo.language.text() == 'java'
 assert mojo.description.text() == 'Touches a test file.'
 assert mojo.deprecated.text() == "Don't use!"
 assert mojo.requiresDependencyResolution.text() == 'test'
-assert mojo.requiresDependencyCollection.text() == 'runtime'
+assert mojo.requiresDependencyCollection.text() == ''
 assert mojo.requiresProject.text() == 'true'
 assert mojo.requiresOnline.text() == 'false'
 assert mojo.requiresDirectInvocation.text() == 'false'

Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy?rev=1353331&r1=1353330&r2=1353331&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance/verify.groovy Sun Jun 24 20:59:37 2012
@@ -20,7 +20,7 @@ assert mojo.language.text() == 'java'
 assert mojo.description.text() == 'Touches a test file.'
 assert mojo.deprecated.text() == "Don't use!"
 assert mojo.requiresDependencyResolution.text() == 'compile'
-assert mojo.requiresDependencyCollection.text() == 'runtime'
+assert mojo.requiresDependencyCollection.text() == ''
 assert mojo.requiresProject.text() == 'true'
 assert mojo.requiresOnline.text() == 'false'
 assert mojo.requiresDirectInvocation.text() == 'false'

Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic-annotations/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic-annotations/verify.groovy?rev=1353331&r1=1353330&r2=1353331&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic-annotations/verify.groovy (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic-annotations/verify.groovy Sun Jun 24 20:59:37 2012
@@ -14,7 +14,7 @@ assert mojo.language.text() == 'java'
 assert mojo.description.text() == 'Touches a test file.'
 assert mojo.deprecated.text() == "Don't use!"
 assert mojo.requiresDependencyResolution.text() == 'test'
-assert mojo.requiresDependencyCollection.text() == 'runtime'
+assert mojo.requiresDependencyCollection.text() == ''
 assert mojo.requiresProject.text() == 'true'
 assert mojo.requiresOnline.text() == 'false'
 assert mojo.requiresDirectInvocation.text() == 'false'
@@ -140,8 +140,8 @@ assert mojo.implementation.text() == 'or
 assert mojo.language.text() == 'java'
 assert mojo.description.text() == ''
 assert mojo.deprecated.text() == ''
-assert mojo.requiresDependencyResolution.text() == 'runtime'
-assert mojo.requiresDependencyCollection.text() == 'runtime'
+assert mojo.requiresDependencyResolution.text() == ''
+assert mojo.requiresDependencyCollection.text() == ''
 assert mojo.requiresProject.text() == 'true'
 assert mojo.requiresOnline.text() == 'false'
 assert mojo.requiresDirectInvocation.text() == 'false'

Modified: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/datamodel/MojoAnnotationContent.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/datamodel/MojoAnnotationContent.java?rev=1353331&r1=1353330&r2=1353331&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/datamodel/MojoAnnotationContent.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/datamodel/MojoAnnotationContent.java Sun Jun 24 20:59:37 2012
@@ -38,9 +38,9 @@ public class MojoAnnotationContent
 
     private LifecyclePhase defaultPhase = LifecyclePhase.NONE;
 
-    private ResolutionScope requiresDependencyResolution = ResolutionScope.RUNTIME;
+    private ResolutionScope requiresDependencyResolution = ResolutionScope.NONE;
 
-    private ResolutionScope requiresDependencyCollection = ResolutionScope.RUNTIME;
+    private ResolutionScope requiresDependencyCollection = ResolutionScope.NONE;
 
     private InstanciationStrategy instantiationStrategy = InstanciationStrategy.PER_LOOKUP;