Jason van Zyl wrote:
>On Fri, 2002-07-12 at 02:56, James Strachan wrote:
>
>
>>Just a thought. How about we introduce a default alias mechanism where if
>>you type
>>
>> maven foo
>>
>>Then if there is no target called 'foo' it will look for a target called
>>'foo:build'. i.e. then we can just use the prefix name to build stuff. In
>>other words we introduce a default target name, 'build' for each plugin.
>>Then for most plugins we get an easy way to build stuff
>>
>> maven ant = maven ant:build
>> maven clover = maven clover:build
>> maven javadoc = maven javadoc:build
>> maven test = maven test:build
>>
>>etc.
>>
>>Then we keep the modular approach, yet avoid lots of typing for targets.
>>Thoughts?
>>
>>
>
>That sounds like a sane approach. Uses Pete's idea of naming the goal
>after the plugin which saves lots of typing for the most commonly used
>goal (most likely the only goal) but will easily allow multiple public
>goals in a plugin without conflict.
>
>+1
>
Hmmm, I can't see the real difference with the way it is now, except
that "build" is "generate", or
"generate-build" :-)
Is there a need for a "default" goal when there is only one goal in a
plugin ?
Most default goals are already in place, as simple aliases to goals
named "ant:generate-build" or whatever.
For new plugins, should we build a "whatever:build" target, that is a
prerequisite of a "whatever" goal ?
The idea that the goals start with the plugin name was already there,
and default goals for plugins too.
This will simply provide a naming scheme for new goals :
- add ":build" to the plugin name
- add another goal named as the plugin, and which "prereqs" the first
one ...
I still think that it's going to be hard to maintain when the number of
plugins/goals grows. We then need 2
identical descriptions, and the number of goals that will appear with
"maven -g" will double, making
it something really hard to read and most likely useless.
I would do something like :
// Beware, fake code ! :-)
if (plugin.getGoals().size() == 1 |
plugin.getDefaultGoal().getName().equals(goalName)){
goalName = pluginName;
}else{
goalName = pluginName + ":" + goalName;
}
Anyway, here is my +1, because the main idea behind the goal renaming is
to get goal names that are
simple, easy to type and remember. This solution can help that (I'd
prefer not to have to build useless,
intermediary goals such as "ant:build" if not needed, though) and it's
all that counts, to me and for users,
I guess.
St�phane
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.comm
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>