You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Tomasz Pik <to...@gmail.com> on 2007/02/25 09:42:32 UTC
Re: [mojo-dev] Re: Moving plugin-support bits out of Genesis into Mojo?
On 2/25/07, Jason van Zyl <ja...@maven.org> wrote
>
> On 24 Feb 07, at 8:22 PM 24 Feb 07, Jason Dillon wrote:
>
> > Folks, I'm thinking about moving the plugin-support module out of
> > Genesis and into the Mojo project. A few plugins I maintain there
> > already use some parts of this, but the classes were simply
> > duplicated.
> >
> > I'm also planning on updating the groovy-maven-plugin at the Mojo
> > project to have the same features as the script-maven-plugin from
> > Genesis, and that plugin uses a quite a bit of the support fluff in
> > plugin-support. I've talked to Jeff already about this and he
> > seems fine with it.
>
> I would much rather see the Groovy stuff work the same way as the
> Beanshell and Ruby mojos. What is the script-maven plugin exactly?
> Some BSF thing?
The 'BSF thing' is here: http://mojo.codehaus.org/script-maven-plugin/
I'm using this with some different languages and its working as
expected.
So I think that ideal situation would be to have one general plugin
like this (using BSF) so different languages may be used in basic
way (this would be a good replacement for using ant iniside maven
for some tasks). And, for advanced scripting: dedicated plugins
line ruby-maven-plugin, groovy-maven-plugin and so on.
Those plugins may also provide 'plugin-tools' so [groovy|ruby] driven
mojos may be created. I was planning to create such support
for BSF plugin too but... I think it will be better not to have BSF
layer - if somebody wants to write a plugin then I thing (s)he
would need direct access to interpreter.
Regards,
Tomek
Re: [mojo-dev] Re: Moving plugin-support bits out of Genesis into Mojo?
Posted by Jason Dillon <ja...@planet57.com>.
On Feb 25, 2007, at 12:42 AM, Tomasz Pik wrote:
>> I would much rather see the Groovy stuff work the same way as the
>> Beanshell and Ruby mojos. What is the script-maven plugin exactly?
>> Some BSF thing?
>
> The 'BSF thing' is here: http://mojo.codehaus.org/script-maven-plugin/
> I'm using this with some different languages and its working as
> expected.
> So I think that ideal situation would be to have one general plugin
> like this (using BSF) so different languages may be used in basic
> way (this would be a good replacement for using ant iniside maven
> for some tasks). And, for advanced scripting: dedicated plugins
> line ruby-maven-plugin, groovy-maven-plugin and so on.
> Those plugins may also provide 'plugin-tools' so [groovy|ruby] driven
> mojos may be created. I was planning to create such support
> for BSF plugin too but... I think it will be better not to have BSF
> layer - if somebody wants to write a plugin then I thing (s)he
> would need direct access to interpreter.
I was aware of this plugin before, though it suffers from the basic
BSF limitation of lack of rich interaction with the underlying
scripting engine. Though as I mentioned before BSF is quite good for
simple expression evaluation, and nice and handy if you need to
expose the choice of language to users.
One of the issues right now with the groovy-maven-plugin, or your
plugin using BSF (or any BSF-thingy), its that with Groovy there is
no control over the GroovyClassLoader, which means that there is no
_easy_ way to allow scripts to import other scripts which happen to
live in the same directory or resource archive. This is easy enough
to resolve by adding a custom resource loader to the
GroovyClassLoader to fetch classes from.
Anyways... my point is (if I even have one) is that your script-maven-
plugin, and the more advanced script-specific plugins have their
place... I don't think that the BSF (or the new scripting muck in JDK
6... though I've yet to actually play with that much) provide a rich
enough interface for some of the more advanced bits one might want
for a scripting interface in Maven.
;-)
--jason