 ------
 Usage
 ------
 Maria Odea Ching
 Vincent Siveton
 ------
 2008-01-01
 ------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements.  See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership.  The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License.  You may obtain a copy of the License at
~~
~~   http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied.  See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html

Usage

  The Plugin Plugin is generally used for Maven plugins. Its goals are bound to different phases in the build life cycle.
  So when you execute a specific phase, the Plugin Plugin goals bound to it are also executed. Aside from this, each goal can
  also be explicitly executed from the command line.

* The <<<plugin:descriptor>>> Goal

  The <<<plugin:descriptor>>> goal is bound to the <<<process-classes>>> phase since 3.0; it was bound to <<<generate-resources>>> phase previously.
  This goal generates the plugin descriptor, which is an xml file that contains information about the plugin
  (see {{{/ref/current/maven-plugin-api/plugin.html}descriptor's reference}}).

  For example, you want to create an archive of your plugin and you execute

+-----+
mvn package
+-----+

  You will see that the <<<plugin.xml>>> file is generated in the <<<target/classes/META-INF/maven>>> directory of your project. The file is
  also bundled in the generated JAR file.

  To explicitly execute the <<<plugin:descriptor>>> goal, type the following in the command line:

+-----+
mvn plugin:descriptor
+-----+

* The <<<plugin:xdoc>>> Goal

  To generate Xdoc files for the mojos of your plugin, execute the following on the command line:

+-----+
mvn plugin:xdoc
+-----+

  The xdoc file is generated by default in <<<$\{project.build.directory\}/generated-site/xdoc>>>.

* The <<<plugin:updateRegistry>>> Goal

  The <<<plugin:updateRegistry>>> goal is bound to the <<<install>>> phase of the build life cycle. This goal updates the
  plugin registry to reflect the changes in the version of the plugin you're installing in your local repository.

  So when you execute

+-----+
mvn install
+-----+

  you will see that the version of the plugin in the <<<plugin-registry.xml>>> is changed to the same version of the plugin
  that you have just installed.

  You can also explicitly execute the <<<plugin:updateRegistry>>> goal by executing

+-----+
mvn plugin:updateRegistry
+-----+

  from the command line.

* The <<<plugin:addPluginArtifactMetadata>>> Goal

  The <<<plugin:addPluginArtifactMetadata>>> goal, on the other hand, is bound to the <<<package>>> phase of the build life cycle.
  This goal will add the metadata to the project artifact. To do this, execute

+-----+
mvn package
+-----+

* The <<<plugin:helpmojo>>> Goal

  To generate a <<<HelpMojo>>> for the mojos of your plugin, execute the following on the command line:

+-----+
mvn plugin:helpmojo
+-----+

  The mojo is generated by default in <<<$\{project.build.directory\}/generated-sources/plugin>>>.
