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 2014/04/13 23:40:13 UTC

svn commit: r1587101 - in /maven/jxr/trunk/maven-jxr-plugin: ./ src/main/java/org/apache/maven/plugin/jxr/

Author: hboutemy
Date: Sun Apr 13 21:40:12 2014
New Revision: 1587101

URL: http://svn.apache.org/r1587101
Log:
[JXR-109] use maven-plugin-tools' java 5 annotations

Modified:
    maven/jxr/trunk/maven-jxr-plugin/pom.xml
    maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java
    maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrReport.java
    maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java
    maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java
    maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java

Modified: maven/jxr/trunk/maven-jxr-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/pom.xml?rev=1587101&r1=1587100&r2=1587101&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/pom.xml (original)
+++ maven/jxr/trunk/maven-jxr-plugin/pom.xml Sun Apr 13 21:40:12 2014
@@ -30,7 +30,6 @@ under the License.
 
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-jxr-plugin</artifactId>
-  <version>2.5-SNAPSHOT</version>
   <packaging>maven-plugin</packaging>
 
   <name>Maven JXR Plugin</name>
@@ -40,6 +39,7 @@ under the License.
     <mavenVersion>2.0.9</mavenVersion>
     <doxia-sitetoolsVersion>1.2</doxia-sitetoolsVersion>
     <doxiaVersion>1.2</doxiaVersion>
+    <mavenPluginToolsVersion>3.2</mavenPluginToolsVersion>
   </properties>
 
   <prerequisites>
@@ -57,6 +57,28 @@ under the License.
           </configuration>
         </plugin>
         <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-plugin-plugin</artifactId>
+          <version>${mavenPluginToolsVersion}</version>
+          <configuration>
+            <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
+          </configuration>
+          <executions>
+            <execution>
+              <id>mojo-descriptor</id>
+              <goals>
+                <goal>descriptor</goal>
+              </goals>
+            </execution>
+            <execution>
+              <id>generated-helpmojo</id>
+              <goals>
+                <goal>helpmojo</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+        <plugin>
           <groupId>org.apache.rat</groupId>
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
@@ -144,6 +166,13 @@ under the License.
     </dependency>
 
     <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>${mavenPluginToolsVersion}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>
@@ -161,7 +190,7 @@ under the License.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-plugin-plugin</artifactId>
-        <version>2.8</version>
+        <version>${mavenPluginToolsVersion}</version>
       </plugin>
     </plugins>
   </reporting>
@@ -174,7 +203,6 @@ under the License.
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-invoker-plugin</artifactId>
-            <version>1.8</version>
             <configuration>
               <projectsDirectory>src/it</projectsDirectory>
               <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
@@ -208,24 +236,6 @@ under the License.
       <reporting>
         <plugins>
           <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-javadoc-plugin</artifactId>
-            <configuration>
-              <tagletArtifacts>
-                <tagletArtifact>
-                  <groupId>org.apache.maven.plugin-tools</groupId>
-                  <artifactId>maven-plugin-tools-javadoc</artifactId>
-                  <version>2.8</version>
-                </tagletArtifact>
-                <tagletArtifact>
-                  <groupId>org.codehaus.plexus</groupId>
-                  <artifactId>plexus-javadoc</artifactId>
-                  <version>1.0</version>
-                </tagletArtifact>
-              </tagletArtifacts>
-            </configuration>
-          </plugin>
-          <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>l10n-maven-plugin</artifactId>
             <version>1.0-alpha-2</version>

Modified: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java?rev=1587101&r1=1587100&r2=1587101&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java (original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java Sun Apr 13 21:40:12 2014
@@ -35,6 +35,8 @@ import org.apache.maven.jxr.JXR;
 import org.apache.maven.jxr.JxrException;
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.AbstractMavenReport;
 import org.apache.maven.reporting.MavenReportException;
@@ -53,126 +55,108 @@ import org.codehaus.plexus.util.StringUt
 public abstract class AbstractJxrReport
     extends AbstractMavenReport
 {
-    /**
-     * @parameter expression="${project}"
-     * @required
-     * @readonly
-     */
+    @Parameter( defaultValue = "${project}", readonly = true, required = true )
     private MavenProject project;
 
-    /**
-     * @component
-     */
+    @Component
     private Renderer siteRenderer;
 
     /**
      * Output folder where the main page of the report will be generated. Note that this parameter is only relevant if
      * the goal is run directly from the command line or from the default lifecycle. If the goal is run indirectly as
      * part of a site generation, the output directory configured in the Maven Site Plugin will be used instead.
-     *
-     * @parameter expression="${project.reporting.outputDirectory}"
-     * @required
      */
+    @Parameter( defaultValue = "${project.reporting.outputDirectory}", required = true )
     private File outputDirectory;
 
     /**
      * File input encoding.
-     *
-     * @parameter expression="${encoding}" default-value="${project.build.sourceEncoding}"
      */
+    @Parameter( property = "encoding", defaultValue = "${project.build.sourceEncoding}" )
     private String inputEncoding;
 
     /**
      * File output encoding.
-     *
-     * @parameter expression="${outputEncoding}" default-value="${project.reporting.outputEncoding}"
      */
+    @Parameter( property = "outputEncoding", defaultValue = "${project.reporting.outputEncoding}" )
     private String outputEncoding;
 
     /**
      * Title of window of the Xref HTML files.
-     *
-     * @parameter expression="${project.name} ${project.version} Reference"
      */
+    @Parameter( defaultValue = "${project.name} ${project.version} Reference" )
     private String windowTitle;
 
     /**
      * Title of main page of the Xref HTML files.
-     *
-     * @parameter expression="${project.name} ${project.version} Reference"
      */
+    @Parameter( defaultValue = "${project.name} ${project.version} Reference" )
     private String docTitle;
 
     /**
      * String used at the bottom of the Xref HTML files.
-     *
-     * @parameter expression="${bottom}" default-value="Copyright &#169; {inceptionYear}&#x2013;{currentYear} {organizationName}. All rights reserved."
      */
+    @Parameter( property = "bottom", defaultValue = "Copyright &#169; {inceptionYear}&#x2013;{currentYear} {organizationName}. All rights reserved." )
     private String bottom;
 
     /**
      * Directory where Velocity templates can be found to generate overviews,
      * frames and summaries.
      * Should not be used. If used, should be an absolute path, like <code>"${basedir}/myTemplates"</code>.
-     *
-     * @parameter default-value="templates"
      */
+    @Parameter( defaultValue = "templates" )
     private String templateDir;
 
     /**
      * Style sheet used for the Xref HTML files.
      * Should not be used. If used, should be an absolute path, like <code>"${basedir}/myStyles.css"</code>.
-     *
-     * @parameter default-value="stylesheet.css"
      */
+    @Parameter( defaultValue = "stylesheet.css" )
     private String stylesheet;
 
     /**
      * A list of exclude patterns to use. By default no files are excluded.
      *
-     * @parameter expression="${excludes}"
      * @since 2.1
      */
+    @Parameter
     private ArrayList excludes;
 
     /**
      * A list of include patterns to use. By default all .java files are included.
      *
-     * @parameter expression="${includes}"
      * @since 2.1
      */
+    @Parameter
     private ArrayList includes;
 
     /**
      * The projects in the reactor for aggregation report.
-     *
-     * @parameter expression="${reactorProjects}"
-     * @readonly
      */
+    @Parameter( defaultValue = "${reactorProjects}", readonly = true )
     protected List reactorProjects;
 
     /**
      * Whether to build an aggregated report at the root, or build individual reports.
      *
-     * @parameter expression="${aggregate}" default-value="false"
      * @deprecated since 2.3. Use the goals <code>jxr:aggregate</code> and <code>jxr:test-aggregate</code> instead.
      */
+    @Parameter( defaultValue = "false" )
     protected boolean aggregate;
 
     /**
      * Whether to skip this execution.
      *
-     * @parameter expression="${maven.jxr.skip}" default-value="false"
      * @since 2.3
      */
+    @Parameter( property = "maven.jxr.skip", defaultValue = "false" )
     protected boolean skip;
 
     /**
      * Link the Javadoc from the Source XRef. Defaults to true and will link
      * automatically if javadoc plugin is being used.
-     *
-     * @parameter expression="${linkJavadoc}" default-value="true"
      */
+    @Parameter( defaultValue = "true" )
     private boolean linkJavadoc;
 
     /**

Modified: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrReport.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrReport.java?rev=1587101&r1=1587100&r2=1587101&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrReport.java (original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrReport.java Sun Apr 13 21:40:12 2014
@@ -19,14 +19,14 @@
 
 package org.apache.maven.plugin.jxr;
 
+import org.apache.maven.plugins.annotations.Mojo;
+
 /**
  * Generates a combined JXR report in an aggregating project.
  * 
- * @goal aggregate
- * @aggregator
  * @since 2.3
- *
  */
+@Mojo( name = "aggregate", aggregator = true )
 public class AggregatorJxrReport
     extends JxrReport
 {

Modified: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java?rev=1587101&r1=1587100&r2=1587101&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java (original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java Sun Apr 13 21:40:12 2014
@@ -18,14 +18,14 @@
  */
 package org.apache.maven.plugin.jxr;
 
+import org.apache.maven.plugins.annotations.Mojo;
+
 /**
  * Generates a combined JXR report for test code in an aggregating project.
  * 
- * @goal test-aggregate
- * @aggregator
  * @since 2.3
- *
  */
+@Mojo( name = "test-aggregate", aggregator = true )
 public class AggregatorJxrTestReport
     extends JxrTestReport
 {

Modified: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java?rev=1587101&r1=1587100&r2=1587101&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java (original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReport.java Sun Apr 13 21:40:12 2014
@@ -19,6 +19,8 @@ package org.apache.maven.plugin.jxr;
  * under the License.
  */
 
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 
 import java.io.File;
@@ -33,40 +35,34 @@ import java.util.Locale;
  *
  * @author <a href="mailto:bellingard.NO-SPAM@gmail.com">Fabrice Bellingard</a>
  * @version $Id$
- * @goal jxr
  */
+@Mojo( name = "jxr" )
 public class JxrReport
     extends AbstractJxrReport
 {
     /**
      * Source directories of the project.
-     *
-     * @parameter expression="${project.compileSourceRoots}"
-     * @required
-     * @readonly
      */
+    @Parameter( defaultValue = "${project.compileSourceRoots}", required = true, readonly = true )
     private List sourceDirs;
 
     /**
      * Specifies the source path where the java files are located.
      * The paths are separated by '<code>;</code>'.
-     *
-     * @parameter expression="${sourcePath}"
      */
+    @Parameter
     private String sourcePath;
 
     /**
      * Folder where the Xref files will be copied to.
-     *
-     * @parameter expression="${project.reporting.outputDirectory}/xref"
      */
+    @Parameter( defaultValue = "${project.reporting.outputDirectory}/xref" )
     private String destDir;
 
     /**
      * Folder where Javadoc is generated for this project.
-     *
-     * @parameter expression="${project.reporting.outputDirectory}/apidocs"
      */
+    @Parameter( defaultValue = "${project.reporting.outputDirectory}/apidocs" )
     private File javadocDir;
 
     /**

Modified: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java?rev=1587101&r1=1587100&r2=1587101&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java (original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java Sun Apr 13 21:40:12 2014
@@ -19,6 +19,8 @@ package org.apache.maven.plugin.jxr;
  * under the License.
  */
 
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 
 import java.io.File;
@@ -33,32 +35,27 @@ import java.util.Locale;
  * @author <a href="mailto:bellingard.NO-SPAM@gmail.com">Fabrice Bellingard</a>
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  * @version $Id$
- * @goal test-jxr
  */
+@Mojo( name = "test-jxr" )
 public class JxrTestReport
     extends AbstractJxrReport
 {
     /**
      * Test directories of the project.
-     *
-     * @parameter expression="${project.testCompileSourceRoots}"
-     * @required
-     * @readonly
      */
+    @Parameter( defaultValue = "${project.testCompileSourceRoots}", required = true, readonly = true )
     private List sourceDirs;
 
     /**
      * Folder where the Xref files will be copied to.
-     *
-     * @parameter expression="${project.reporting.outputDirectory}/xref-test"
      */
+    @Parameter( defaultValue = "${project.reporting.outputDirectory}/xref-test" )
     private String destDir;
 
     /**
      * Folder where Test Javadoc is generated for this project.
-     *
-     * @parameter expression="${project.reporting.outputDirectory}/testapidocs"
      */
+    @Parameter( defaultValue = "${project.reporting.outputDirectory}/testapidocs" )
     private File testJavadocDir;
 
     /**