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 2019/07/19 07:49:32 UTC

[maven-site] branch master updated: Moving parameters doclets to annotation (#92)

This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 681395b  Moving parameters doclets to annotation (#92)
681395b is described below

commit 681395bf416aadc7ed982285347634babf35017d
Author: Nayden Gochev <go...@gmail.com>
AuthorDate: Fri Jul 19 10:49:27 2019 +0300

    Moving parameters doclets to annotation (#92)
    
    We should not use the doclets anymore and also they were not working when I tried,
    we can use @Parameter instead.
---
 .../apt/guides/mini/guide-configuring-plugins.apt  | 40 +++++-----------------
 1 file changed, 9 insertions(+), 31 deletions(-)

diff --git a/content/apt/guides/mini/guide-configuring-plugins.apt b/content/apt/guides/mini/guide-configuring-plugins.apt
index 349850a..97bc4f9 100644
--- a/content/apt/guides/mini/guide-configuring-plugins.apt
+++ b/content/apt/guides/mini/guide-configuring-plugins.apt
@@ -111,19 +111,13 @@ Guide to Configuring Plug-ins
 public class MyQueryMojo
     extends AbstractMojo
 {
-    /**
-     * @parameter expression="${query.url}"
-     */
+    @Parameter(property = "query.url", required = true)
     private String url;
 
-    /**
-     * @parameter default-value="60"
-     */
+    @Parameter(property = "timeout", required = false, defaultValue = "50")
     private int timeout;
 
-    /**
-     * @parameter
-     */
+    @Parameter(property = "options")
     private String[] options;
 
     public void execute()
@@ -274,9 +268,7 @@ mvn javadoc:help -Ddetail -Dgoal=javadoc
 public class MyAnimalMojo
     extends AbstractMojo
 {
-    /**
-     * @parameter
-     */
+    @Parameter(property = "animals")
     private List animals;
 
     public void execute()
@@ -331,11 +323,7 @@ public class MyAnimalMojo
 
 +-----+
 ...
-    /**
-     * My Map.
-     *
-     * @parameter
-     */
+    @Parameter(property = "myMap")
     private Map myMap;
 ...
 +-----+
@@ -357,11 +345,7 @@ public class MyAnimalMojo
 
 +-----+
 ...
-    /**
-     * My Properties.
-     *
-     * @parameter
-     */
+    @Parameter(property = "myProperties")
     private Properties myProperties;
 ...
 +-----+
@@ -507,19 +491,13 @@ public class MyAnimalMojo
 public class MyBindedQueryMojo
     extends AbstractMojo
 {
-    /**
-     * @parameter expression="${query.url}"
-     */
+    @Parameter(property = "query.url", required = true)
     private String url;
 
-    /**
-     * @parameter default-value="60"
-     */
+    @Parameter(property = "timeout", required = false, defaultValue = "50")
     private int timeout;
 
-    /**
-     * @parameter
-     */
+    @Parameter(property = "options")
     private String[] options;
 
     public void execute()