Hi Eli,

> -----Original Message-----
> From: Eli Doran [mailto:[EMAIL PROTECTED]
> Sent: jeudi 22 septembre 2005 22:35
> To: users@maven.apache.org
> Subject: clean command
> 
> I have been wondering for some time why it is necessary to type "m2
> clean:clean" instead of just "m2 clean". I understand it wants the goal
> for the plugin but if the goal's name is not specified couldn't it use a
> default goal? or at the very least check if it has a goal of the exact
> same name to use; as in the 'clean' example.  It's just one of those
> things that makes me shake my head and wonder why that is "the way it
> is". Doesn't anyone else get annoyed at having to type "clean:clean"
> instead of just "clean" ?

All goals in maven2 must be specified using the "[pluging name]:[goal name]"
notation. This is to prevent clashes between different plugin's goals.

Actually to be even more precise the full syntax is "[groupid]:[pluging
name]:[goal name]" but well-known plugins are registered in some descriptor
file that allows to use the shortcut notation.

Now Maven 2 has also introduced the notion of phases ("install", "test",
"deploy", etc). Phases need to be differentiated from goals. Hence the
different notations.

Note that if you're calling clean:clean often you may want to bind this goal
to a phase in your POM so that it's executed all the time.

Does that make sense?

Thanks
-Vincent


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

Reply via email to