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 2020/01/23 08:14:36 UTC
[maven-doxia-book-maven-plugin] 10/35: [DOXIATOOLS-38] use plugin
java 5 annotations instead of old-style javadoc annotations
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia-book-maven-plugin.git
commit 4429387556d6bc6c3c0600829e8bfce7d274a557
Author: Herve Boutemy <hb...@apache.org>
AuthorDate: Sun Jun 3 20:42:42 2012 +0000
[DOXIATOOLS-38] use plugin java 5 annotations instead of old-style javadoc annotations
git-svn-id: https://svn.apache.org/repos/asf/maven/doxia/doxia-tools/trunk@1345773 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 7 ++++-
.../maven/doxia/plugin/DoxiaRenderBooksMojo.java | 30 +++++++++-------------
2 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/pom.xml b/pom.xml
index f89b82a..7569327 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,7 @@ under the License.
<properties>
<doxiaVersion>1.3</doxiaVersion>
<mavenVersion>2.0.6</mavenVersion>
- <pluginPluginVersion>2.9</pluginPluginVersion>
+ <pluginPluginVersion>3.0</pluginPluginVersion>
</properties>
<dependencies>
@@ -52,6 +52,11 @@ under the License.
<version>${mavenVersion}</version>
</dependency>
<dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>${pluginPluginVersion}</version>
+ </dependency>
+ <dependency>
<groupId>${project.groupId}</groupId>
<artifactId>doxia-book-renderer</artifactId>
<version>1.3-SNAPSHOT</version>
diff --git a/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java b/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java
index fcdc6bf..5390ba9 100644
--- a/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java
+++ b/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java
@@ -28,6 +28,9 @@ import org.apache.maven.doxia.tools.SiteTool;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
@@ -40,11 +43,11 @@ import java.util.Locale;
/**
* A Mojo to create books in different output formats.
*
- * @goal render-books
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @version $Id$
* @since 1.0
*/
+@Mojo( name = "render-books" )
public class DoxiaRenderBooksMojo
extends AbstractMojo
{
@@ -57,16 +60,14 @@ public class DoxiaRenderBooksMojo
/**
* BookDoxia component
- *
- * @component
*/
+ @Component
private BookDoxia bookDoxia;
/**
* SiteTool.
- *
- * @component
*/
+ @Component
protected SiteTool siteTool;
// ----------------------------------------------------------------------
@@ -75,46 +76,39 @@ public class DoxiaRenderBooksMojo
/**
* A list of books.
- *
- * @parameter
- * @required
*/
+ @Parameter( required = true )
private List<Book> books;
/**
* Base directory of the project.
- *
- * @parameter default-value="${basedir}"
*/
+ @Parameter( defaultValue = "${basedir}", readonly = true )
private File basedir;
/**
* Directory containing the generated project docs.
- *
- * @parameter default-value="${project.build.directory}/generated-site"
*/
+ @Parameter( defaultValue = "${project.build.directory}/generated-site" )
private File generatedDocs;
/**
* A comma separated list of locales supported by Maven. The first valid token will be the default Locale
* for this instance of the Java Virtual Machine.
- *
- * @parameter default-value="${locales}"
*/
+ @Parameter( defaultValue = "${locales}" )
protected String locales;
/**
* Specifies the input encoding.
- *
- * @parameter expression="${encoding}" default-value="${project.build.sourceEncoding}"
*/
+ @Parameter( property = "encoding", defaultValue = "${project.build.sourceEncoding}" )
private String inputEncoding;
/**
* Specifies the output encoding.
- *
- * @parameter expression="${outputEncoding}" default-value="${project.reporting.outputEncoding}"
*/
+ @Parameter( property = "outputEncoding", defaultValue = "${project.reporting.outputEncoding}" )
private String outputEncoding;
// ----------------------------------------------------------------------