Author: aramirez
Date: Wed Feb 15 00:26:46 2006
New Revision: 377963

URL: http://svn.apache.org/viewcvs?rev=377963&view=rev
Log:
-added info in configuring plugins

Modified:
    maven/site/trunk/src/site/apt/guides/mini/guide-configuring-plugins.apt

Modified: 
maven/site/trunk/src/site/apt/guides/mini/guide-configuring-plugins.apt
URL: 
http://svn.apache.org/viewcvs/maven/site/trunk/src/site/apt/guides/mini/guide-configuring-plugins.apt?rev=377963&r1=377962&r2=377963&view=diff
==============================================================================
--- maven/site/trunk/src/site/apt/guides/mini/guide-configuring-plugins.apt 
(original)
+++ maven/site/trunk/src/site/apt/guides/mini/guide-configuring-plugins.apt Wed 
Feb 15 00:26:46 2006
@@ -332,9 +332,78 @@
   and <<<execution2>>> will be executed applying the configuration setup when 
   the build phase is already in install.
 
+  Now, Let us have another mojo example which is binded to a lifecycle phase.
+
++----+
[EMAIL PROTECTED] package
+public class MyBindedQueryMojo
+    extends AbstractMojo
+{
+    /**
+     * @parameter
+     */
+    private String url;
+
+    /**
+     * @parameter
+     */
+    private int timeout;
+
+    /**
+     * @parameter
+     */
+    private String[] options;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        ...
+    }
+}
++----+
+
+  From the above mojo example, MyBindedQueryMojo is binded to package phase
+  (see the "@phase" notation). But if we want to execute this mojo to install 
+  phase not with package we can rebind this mojo into a new lifecycle phase 
+  using the \<phase\> tag under \<executions\>.
+
++----+
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-myquery-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>execution1</id>
+           <phase>install</phase>
+            <configuration>
+              <url>http://www.bar.com/query</url>
+              <timeout>15</timeout>
+              <options>
+                <option>four</option>
+                <option>five</option>
+                <option>six</option>
+              </options>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++----+
+
+  Now, MyBindedQueryMojo default phase which is package has been overrided by 
+  install phase. 
+
   Configurations inside the <executions> tag differ from those that are 
outside 
   <executions> in that they cannot be used from a direct command line 
   invocation. Instead they are only applied when the lifecycle phase they are 
   bound to are invoked.  Alternatively, if you move a configuration section 
   outside of the executions section, it will apply globally to all invocations 
   of the plugin.
+
+  
\ No newline at end of file


Reply via email to