Vincent Massol wrote:
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.
i understand it provides a namespace for the goals in a plugin. couldn't
the plugins have default goals? or if they have a goal that exactly
matches the plugin's name use that by default?
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.
ahhh, here's the why. to differentiate plugins from phases.
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?
yes, total sense, thank you. it's not a standard thing whether i want
the build to be clean or not so i can't take advantage of this but now
that i understand why things are they way they are i'll stop wondering
about it. ;)
thank you both,
~eli
Thanks
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]