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/04 12:01:40 UTC
svn commit: r1333842 - in
/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations:
JavaAnnotationsMojoDescriptorExtractor.java scanner/MojoAnnotatedClass.java
Author: olamy
Date: Fri May 4 10:01:39 2012
New Revision: 1333842
URL: http://svn.apache.org/viewvc?rev=1333842&view=rev
Log:
expose datamodel classes for Mojo and Execute annotations
Modified:
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/scanner/MojoAnnotatedClass.java
Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java?rev=1333842&r1=1333841&r2=1333842&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java Fri May 4 10:01:39 2012
@@ -25,6 +25,7 @@ import org.apache.maven.plugin.descripto
import org.apache.maven.project.MavenProject;
import org.apache.maven.tools.plugin.DefaultPluginToolsRequest;
import org.apache.maven.tools.plugin.PluginToolsRequest;
+import org.apache.maven.tools.plugin.annotations.datamodel.MojoAnnotationContent;
import org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotatedClass;
import org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScanner;
import org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScannerRequest;
@@ -98,12 +99,12 @@ public class JavaAnnotationsMojoDescript
{
MojoDescriptor mojoDescriptor = new MojoDescriptor();
- Mojo mojo = mojoAnnotatedClass.getMojo();
+ MojoAnnotationContent mojo = mojoAnnotatedClass.getMojo();
mojoDescriptor.setAggregator( mojo.aggregator() );
mojoDescriptor.setDependencyResolutionRequired( mojo.requiresDependencyResolution() );
mojoDescriptor.setDirectInvocationOnly( mojo.requiresDirectInvocation() );
-
+ mojoDescriptor.setDeprecated( mojo.getDeprecated() );
mojoDescriptors.add( mojoDescriptor );
}
return mojoDescriptors;
Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/scanner/MojoAnnotatedClass.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/scanner/MojoAnnotatedClass.java?rev=1333842&r1=1333841&r2=1333842&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/scanner/MojoAnnotatedClass.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/scanner/MojoAnnotatedClass.java Fri May 4 10:01:39 2012
@@ -18,9 +18,9 @@ package org.apache.maven.tools.plugin.an
* under the License.
*/
-import org.apache.maven.tools.plugin.annotations.Execute;
-import org.apache.maven.tools.plugin.annotations.Mojo;
import org.apache.maven.tools.plugin.annotations.datamodel.ComponentAnnotationContent;
+import org.apache.maven.tools.plugin.annotations.datamodel.ExecuteAnnotationContent;
+import org.apache.maven.tools.plugin.annotations.datamodel.MojoAnnotationContent;
import org.apache.maven.tools.plugin.annotations.datamodel.ParameterAnnotationContent;
import java.util.ArrayList;
@@ -36,9 +36,9 @@ public class MojoAnnotatedClass
private String parentClassName;
- private Mojo mojo;
+ private MojoAnnotationContent mojo;
- private Execute execute;
+ private ExecuteAnnotationContent execute;
private List<ParameterAnnotationContent> parameters;
@@ -60,23 +60,23 @@ public class MojoAnnotatedClass
return this;
}
- public Mojo getMojo()
+ public MojoAnnotationContent getMojo()
{
return mojo;
}
- public MojoAnnotatedClass setMojo( Mojo mojo )
+ public MojoAnnotatedClass setMojo( MojoAnnotationContent mojo )
{
this.mojo = mojo;
return this;
}
- public Execute getExecute()
+ public ExecuteAnnotationContent getExecute()
{
return execute;
}
- public MojoAnnotatedClass setExecute( Execute execute )
+ public MojoAnnotatedClass setExecute( ExecuteAnnotationContent execute )
{
this.execute = execute;
return this;