Roger Ye schrieb:
Hi,

Hi,

I'm new to Maven, and now have a basic understanding of the Goal:Phase
notation in Maven to do sth.

That's not quite correct. Each packaging (for example jar) has a lifecycle associated to it. This lifecylce consists of a sequence of phases. So when you do 'mvn install' you tell maven to execute the lifecylce-phase named 'install' and not to invoke the install-plugin.

The notation you used above is used for executing a goal (mojo) of a plugin directly. So it should read plugin:goal.

My question is, regarding an unfamiliar goal, how can I know what phases are
available?

There is a detailed description of the default build-lifecylce available here [1]. Every site of a plugin has a report 'Project Reports/Plugin Documentation' that lists all the goals of the plugin. The plugins maintained by the maven developers are listed here [2]. And many other plugins are available at the mojo project over codehaus.org [3].

I do think there should be a common way for all the maven goals to provide
some help information, e.g. the usage of the goal and all its available
phases and their purposes, respectively.

e.g. for every shell command we have the -h or --help option to get help and
usage information, then what about we incorporate this convention into the
maven world and let every goal define a phase named "help" to do that?

The 'describe' goal of the maven-help-plugin can do this, it lists information about other plugins. It is used like this 'mvn help:describe -Dplugin=deploy -Dfull'. This will output the available goals of the deploy-plugin together with the available parameters, but the formating is not very user friendly.

Thanks
Roger


-Tim

[1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
[2] http://maven.apache.org/plugins/
[3] http://mojo.codehaus.org/plugins.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to