St�phane MOR <[EMAIL PROTECTED]> wrote on 07/08/2002 07:50:30 AM:
> Hi,
>
> Now, Maven is composed exclusively in plugins.
>
> Plugins are managed in <goals/>.
> One goal may need other goals, or may be required by another goal.
> Those goals are used with their names, ie <goal name="foo:bar"/>.
>
> I think that we should have a naming convention for them.
> This way users could create / use new plugins more easily.
>
> Here is what I propose :
>
> 1) Use the plugin dir as the plugin name. So, if you have a plugin in
> ${maven.home}/plugins/foo,
> your plugin name is "foo". This avoids having 2 plugins with the
> same name by accident.
Back when we originally proposed to do plugins, the consensus was that the
directory name was
${maven.home}/plugins/<pluginName>-<pluginVersion>, e.g.
/home/dion/maven/plugins/core-1.0.1/
> 2) Use default goals for each plugin. For instance, in the plugin "foo",
> you setup a "foo" goal that
> will execute a sequence of goals to be executed (using
> prereqs="foo:bar,foo:bar-2,...").
> This allows a user to type "maven site" and the site will be
> generated instead of
> "maven site:generate". Applied to each plugin, it would ease the
> understanding of the workflow.
Don't the current plugins really just perform a single task, rather than
multiple tasks, as the old ones
used to be?
> 3) Use lower-case hyphenated goal name, ie "goal-name". This is what has
> been implicitely done
> till now, so ...
+1 - This was what we used to do, e.g. validate-pom
> 4) Name goals using the pattern : "plugin:hyphenated-goal-name", ie
> "foo:bar" except for default goals.
> This allows to sort goals by plugin, for "maven -q" for instance.
> This also avoid name conflicts.
+1
> Optionnal : all goals in a plugin should start with the plugin name.
> Again, this is to avoid name conflicts.
I'd much rather this was enforced by whatever loads the plugins.
> My <goal/> is to provide a common naming convention, so that "external"
> plugins adopt it.
It'd be a lot better if the plugin code forced the convention internally
so that 'external' plugins didn't have to care.
> Then, the plugin management will be much easier. Coupled with the new
> Exception handling from bob,
> debugging will get MUCH easier. Workflow comprehension will be easier,
too.
>
> Thanks,
> St�phane
--
dIon Gillard, Multitask Consulting
Work: http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers