Author: hboutemy
Date: Sat Jul 20 21:20:38 2013
New Revision: 1505210

URL: http://svn.apache.org/r1505210
Log:
[MPLUGIN-249] give snippets to show use of expressions to get Maven objects

Modified:
    
maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt
    maven/plugin-tools/trunk/maven-plugin-tools-java/src/site/apt/index.apt

Modified: 
maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt?rev=1505210&r1=1505209&r2=1505210&view=diff
==============================================================================
--- 
maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt 
(original)
+++ 
maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt 
Sat Jul 20 21:20:38 2013
@@ -28,7 +28,7 @@
 
 Maven Plugin Tool for Annotations
 
- The Maven Plugin Tool for Annotations is the impl of 
{{{../maven-plugin-tools-api/index.html}maven-plugin-tools-api}}
+ The Maven Plugin Tool for Annotations is the implementation of 
{{{../maven-plugin-tools-api/index.html}maven-plugin-tools-api}}
  to extract descriptors from plugins written in Java with
  {{{../maven-plugin-annotations/index.html}Maven Plugin Tools Java 5 
Annotations}}.
 
@@ -104,6 +104,13 @@ public class MyMojo
     @Component
     private Settings settings;
 
+    // sample objects taken from Maven API through 
PluginParameterExpressionEvaluator
+    @Parameter( defaultValue = "${basedir}", readonly = true )
+    private File basedir;
+
+    @Parameter( defaultValue = "${project.build.directory}", readonly = true )
+    private File target;
+
     public void execute()
     {
         ...
@@ -119,3 +126,6 @@ public class MyMojo
  * 
{{{/developers/mojo-api-specification.html#The_Descriptor_and_Annotations}Mojo 
API Specification}}
 
  * {{{/ref/current/maven-plugin-api/plugin.html}META-INF/maven/plugin.xml 
plugin descriptor}}
+
+ * 
{{{/ref/current/maven-core/apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html}PluginParameterExpressionEvaluator}},
+   used to evaluate plugin parameters values during Mojo configuration,

Modified: 
maven/plugin-tools/trunk/maven-plugin-tools-java/src/site/apt/index.apt
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-java/src/site/apt/index.apt?rev=1505210&r1=1505209&r2=1505210&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-java/src/site/apt/index.apt 
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-java/src/site/apt/index.apt Sat 
Jul 20 21:20:38 2013
@@ -105,6 +105,19 @@ public class MyMojo
      */
     private Settings settings;
 
+    // sample objects taken from Maven API through 
PluginParameterExpressionEvaluator
+    /**
+    * @parameter default-value="${basedir}"
+    * @readonly
+    */
+    private File basedir;
+
+    /**
+    * @parameter default-value="${project.build.directory}"
+    * @readonly
+    */
+    private File target;
+
     public void execute()
     {
         ...
@@ -120,3 +133,6 @@ public class MyMojo
  * 
{{{/developers/mojo-api-specification.html#The_Descriptor_and_Annotations}Mojo 
API Specification}}
 
  * 
{{{/ref/current/maven-plugin-api/plugin.html}<<<META-INF/maven/plugin.xml>>> 
plugin descriptor}}
+
+ * 
{{{/ref/current/maven-core/apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html}PluginParameterExpressionEvaluator}},
+   used to evaluate plugin parameters values during Mojo configuration,


Reply via email to