Reputation: 1069
Running $ mvn help:describe -Dcmd=clean
tells you that 'clean' is a lifecycle, and lists its phases. Similarly $ mvn help:describe -Dcmd=site
tells you that 'site' is a lifecycle and lists its phases.
Is there any value for the cmd
parameter of the help:describe
goal that will list the phases of the default lifecycle?
Upvotes: 5
Views: 624
Reputation: 23268
The cmd option is "a single goal or a single phase" to describe.
While it is true that clean
and site
are the name of lifecycles, they are also the name of phases within those lifecycles.
It also looks like the description the help:describe
goal prints out is a bit misleading (here's the source code). cmd
is not actually "a lifecycle with the following phases", but the name of a particular phase within a lifecycle whose phases are listed. You can prove this by trying mvn help:describe -Dcmd=post-site
for example, and Maven prints out
'post-site' is a lifecycle with the following phases:
* pre-site: Not defined
* site: org.apache.maven.plugins:maven-site-plugin:3.0:site
* post-site: Not defined
* site-deploy: org.apache.maven.plugins:maven-site-plugin:3.0:deploy
even though 'post-site' is the name of a phase and not a lifecycle.
As for printing out the phases of the default lifecycle, just set cmd
to the name of any phase within the default lifecycle, such as package
or install
and it will print them out.
Just to be complete, the definitions for all the standard phases and lifecycles are in Maven's components.xml and the the ID of the default lifecycle is 'default'.
Upvotes: 6