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

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to