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 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: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 ${}/generated-sources/plugin.