Problem

Is there or how to display all available plugin’s goals and parameters (with explanation) in Maven? For example,maven-eclipse “mvn eclipse:eclipse” plugin, how do i know what are the available goals and parameters of it?

Yes, i can always Google it and find the information in the maven-eclipse plugin’s website, but is there a shortcut for it?

Solution

You can use Maven help plugin, describe goal, to display the entire available goals and parameter for a plugin.

For example,

1. mvn help:describe -Dplugin=eclipse

List all of the available goals of maven-eclipse plugin.

mvn help:describe -Dplugin=eclipse

Here’s the output …

//... omitted for readable purpose
eclipse:m2eclipse
  Description: Creates an eclipse project that is ready to use with the
    M2Elipse plugin.
  Deprecated. No reason given
 
eclipse:myeclipse
  Description: Generates MyEclipse configuration files
  Deprecated. No reason given
 
eclipse:myeclipse-clean
  Description: Deletes configuration files used by MyEclipse
  Deprecated. No reason given
 
eclipse:rad
  Description: Generates the rad-6 configuration files.
  Deprecated. No reason given
 
eclipse:rad-clean
  Description: Deletes the config files used by Rad-6. the files .j2ee and
    the file .websettings
  Deprecated. No reason given
 
eclipse:remove-cache
  Description: Removes the not-available marker files from the repository.
  Deprecated. No reason given
//... omitted for readable purpose

2. mvn help:describe -Dplugin=eclipse -Dmojo=eclipse

Display the detail of “eclipse” parameter of maven-eclipse plugin, with full explanation.

mvn help:describe -Dplugin=eclipse -Dmojo=eclipse -Dfull=true
Note
mojo” is means the parameter of plugin.

Here’s the output …

//... omitted for readable purpose
wtpapplicationxml (Default: false)
  Must the application files be written for ear projects in a separate
  directory.
  Deprecated. No reason given
 
wtpContextName
  JEE context name of the WTP module. ( ex. WEB context name ).
  Deprecated. No reason given
 
wtpdefaultserver
  What WTP defined server to use for deployment informations.
  Deprecated. No reason given
 
wtpmanifest (Default: false)
  Must the manifest files be written for java projects so that that the jee
  classpath for wtp is correct.
  Deprecated. No reason given
 
wtpversion (Default: none)
  The version of WTP for which configuration files will be generated. The
  default value is 'none' (don't generate WTP configuration), supported
  versions are 'R7', '1.0', and '1.5'
  Deprecated. No reason given
//... omitted for readable purpose
Note
For more “help:describe” examples, please refer to this official “Configuring Describe Goal” article.
Tags :
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider making a donation to the charity, thanks.

Related Posts

Popular Posts