You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jason Dillon <ja...@planet57.com> on 2007/02/25 02:22:39 UTC

Moving plugin-support bits out of Genesis into Mojo?

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.

Does anyone object to moving these bits to the Mojo project?  I'm  
actually working on this at the moment, but if there are objections I  
will stop and we can discus more if needed.

--jason

Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Jason Dillon <ja...@planet57.com>.
On Feb 26, 2007, at 7:08 AM, Donald Woods wrote:
> The only concern, would be that we need multiple Geronimo commiters  
> with commit and release access to the dependent Mojo project, so we  
> don't lie in limbo when we need fixes/changes made to the plugin to  
> support new build requirements....

Understood, and we have a few committers on the Mojo project already:

   * Jason van Zyl
   * Hiram Chirino
   * David Blevins
   * Jeff Genender
   * James Strachan
   * Alan Cabrera
   * (ME) Jason Dillon

Not sure I listed all of them... but we have a few ;-)

And, well project-support is not really changing all that much,  
changes to be made in the future are to make these bits into more re- 
usable components instead of base-classes, blah, blah.

As for being stuck in limbo... well, I don't think that will be the  
case any time soon... I'm still here :-P

--jason


Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Jason Dillon <ja...@planet57.com>.
On Feb 26, 2007, at 8:29 AM, Anita Kulshreshtha wrote:

>    I agree with Donald because this code (plugins/plugin-support) is
> very closely tied to geronimo. Here is an example:
> System.getProperties().remove("geronimo.bootstrap.logging.enabled");

This is the only bit from plugin-support that is Geronimo specific,  
and I've a note to move that stuff out.

--jason


Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Anita Kulshreshtha <a_...@yahoo.com>.
   I agree with Donald because this code (plugins/plugin-support) is
very closely tied to geronimo. Here is an example:
System.getProperties().remove("geronimo.bootstrap.logging.enabled");

Thanks
Anita
 
--- Donald Woods <dr...@yahoo.com> wrote:

> The only concern, would be that we need multiple Geronimo commiters
> with 
> commit and release access to the dependent Mojo project, so we don't
> lie 
> in limbo when we need fixes/changes made to the plugin to support new
> 
> build requirements....
> 
> 
> -Donald
> 
> Jason Dillon wrote:
> > Folks, I'm thinking about moving the plugin-support module out of 
> > Genesis and into the Mojo project. 
................................
..........................................
> > Does anyone object to moving these bits to the Mojo project?  I'm 
> > actually working on this at the moment, but if there are objections
> I 
> > will stop and we can discus more if needed.
> > 
> > --jason
> > 
> > 
> 



 
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Donald Woods <dr...@yahoo.com>.
The only concern, would be that we need multiple Geronimo commiters with 
commit and release access to the dependent Mojo project, so we don't lie 
in limbo when we need fixes/changes made to the plugin to support new 
build requirements....


-Donald

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.
> 
> Does anyone object to moving these bits to the Mojo project?  I'm 
> actually working on this at the moment, but if there are objections I 
> will stop and we can discus more if needed.
> 
> --jason
> 
> 

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

Re: [mojo-dev] Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Tomasz Pik <to...@gmail.com>.
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: Moving plugin-support bits out of Genesis into Mojo?

Posted by Jason Dillon <ja...@planet57.com>.
On Feb 24, 2007, at 6:18 PM, Jason van Zyl wrote:
>> AFAIK, BSF-like execution isn't rich enough, unless I re-write the  
>> engine to allow customizing the classpath/scriptpath, etc... and  
>> even then I'm not sure it will cut it.
>
> It's not. I'm not a fan of BSF and never used it in Plexus for  
> scripting.

I don't really care for it myself... though its handy in some cases  
when you want to expose user's a choice of language to eval a simple  
snippet of code.  But its far to limiting in how one can interact  
with the underlying scripting engine, and thus I don't really use it.


>> This is *not* for writing mojos, but for allowing groovy Scripts  
>> to be run inside of Maven.
>
> So like that Ant Run plugin essentially.

Yes.


>> I still have some of the work I did to make richer Groovy plexus  
>> components around too, which is to help make Mojo's with Groovy,  
>> but I have not had time to deal with merging my bits into the bits  
>> under Mojo's mojo-sandbox/groovy-maven-tools stuff.
>
> You'll welcome to Plexus access if you want to push any groovy bits  
> into the sandbox if you've improved it. The Groovy Plexus is not  
> update-to-date and not quite up to snuff.

I will revisit my work and what exists there today and see if any of  
my changes would provide better support... its been, um... at least a  
year or more since I worked on my Groovy factory component for Plexus.


>> This stuff is more along the lines of the Beanshell and Ruby mojo  
>> support stuff you are refering too... ie. writing Maven plugins  
>> with Groovy.  But the groovy-maven-plugin (script-maven-plugin in  
>> Genesis) are focuses not on building plugins, but allow projects  
>> to invoke small Groovy scripts (or bigger ones, as it the case  
>> with the Geronimo TCK harness).
>
> Fair enough, but the plumbing could still all be the same I would  
> imagine.

Yes, they could share some of the same basic code, though... one big  
difference between this plugin (and the factory bits I did before)  
and the bits to use Groovy to build mojos that exists now is that the  
later compiles to Java code, where this plugin simply executes the  
script bodies using Groovy's API (ie. GroovyClassLoader, etc).

Anyways... I've become addicted to Groovy these days, so I plan to  
work on getting Groovy support in Maven settled down and polished.   
Part of that is moving the bits I have now out of Geronimo and into  
Mojo.

I'll ping you later about the Plexus Groovy stuff when I have some  
time to look into that more.  I do eventually want to get that  
working well enough so that I could stop writing plugins in Java ;-)   
Closures, antbuilder, gstrings and all those groovy-jdk methods are  
soooo helpful for mojo-like tasks ;-)

Thanks,

--jason

Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Jason Dillon <ja...@planet57.com>.
On Feb 24, 2007, at 6:18 PM, Jason van Zyl wrote:
>> I still have some of the work I did to make richer Groovy plexus  
>> components around too, which is to help make Mojo's with Groovy,  
>> but I have not had time to deal with merging my bits into the bits  
>> under Mojo's mojo-sandbox/groovy-maven-tools stuff.
>
> You'll welcome to Plexus access if you want to push any groovy bits  
> into the sandbox if you've improved it. The Groovy Plexus is not  
> update-to-date and not quite up to snuff.

Is there a recommended tag/branch of plexus-component-factories which  
works with Maven 2.0.x, or is this good enough to update:

     http://svn.codehaus.org/plexus/plexus-component-factories/trunk/ 
plexus-groovy-factory

--jason

Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Jason van Zyl <ja...@maven.org>.
On 24 Feb 07, at 9:07 PM 24 Feb 07, Jason Dillon wrote:

> On Feb 24, 2007, at 5:54 PM, Jason van Zyl 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 script-maven-plugin is really just an advanced groovy-maven- 
> plugin which I whipped up to support getting better scripting into  
> Maven, which we now use extensively in the TCK harness.
>
>     http://geronimo.apache.org/maven/genesis/plugins/script-maven- 
> plugin/index.html
>
> I had planned on adding other scripting-related muck here, though  
> turns out that Groovy was all I needed, so the name is legacy.  Its  
> basically a much more configurable/flexible implementation of:
>
>     http://mojo.codehaus.org/groovy-maven-plugin/
>
> AFAIK, BSF-like execution isn't rich enough, unless I re-write the  
> engine to allow customizing the classpath/scriptpath, etc... and  
> even then I'm not sure it will cut it.

It's not. I'm not a fan of BSF and never used it in Plexus for  
scripting.

>
> This is *not* for writing mojos, but for allowing groovy Scripts to  
> be run inside of Maven.

So like that Ant Run plugin essentially.

> The difference might be a bit subtle, but there are some times when  
> you just need a tiny bit of scripting to solve a problem, and the  
> work to create a Maven plugin, vote/stage/release it so that it can  
> be used is just not worth the trouble.
>
>  * * *
>
> I still have some of the work I did to make richer Groovy plexus  
> components around too, which is to help make Mojo's with Groovy,  
> but I have not had time to deal with merging my bits into the bits  
> under Mojo's mojo-sandbox/groovy-maven-tools stuff.

You'll welcome to Plexus access if you want to push any groovy bits  
into the sandbox if you've improved it. The Groovy Plexus is not  
update-to-date and not quite up to snuff.

> This stuff is more along the lines of the Beanshell and Ruby mojo  
> support stuff you are refering too... ie. writing Maven plugins  
> with Groovy.  But the groovy-maven-plugin (script-maven-plugin in  
> Genesis) are focuses not on building plugins, but allow projects to  
> invoke small Groovy scripts (or bigger ones, as it the case with  
> the Geronimo TCK harness).

Fair enough, but the plumbing could still all be the same I would  
imagine.

Thanks,

Jason.



>
> --jason
>


Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Jason Dillon <ja...@planet57.com>.
Here is a tiny example of the plugin actually doing something useful:

     https://svn.apache.org/repos/asf/geronimo/sandbox/hokeypokey/ 
trunk/pom.xml

A tiny bit of logic here is used to prevent extra downloading/ 
unpacking.  To make this into an official Maven plugin would be  
overkill.  And you can't really do this with antrun, because there is  
no easy way to short-circuit the bits using <get> to fetch the zip  
here.  Ant's way of doing this is to use linked targets with if/ 
unless attributes, which AFAIK can't be used in antrun.  And  
personally, I'd rather see this little bit of script, than linked  
targets anyways, never did like that mess.

IMO, this plugin helps folks (er me really) to solve some problems,  
and when/if I find they are generally useful outside of the scope I  
use them in, then I start to think about turning them into real Maven  
plugins...

--jason


On Feb 24, 2007, at 6:07 PM, Jason Dillon wrote:

> On Feb 24, 2007, at 5:54 PM, Jason van Zyl 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 script-maven-plugin is really just an advanced groovy-maven- 
> plugin which I whipped up to support getting better scripting into  
> Maven, which we now use extensively in the TCK harness.
>
>     http://geronimo.apache.org/maven/genesis/plugins/script-maven- 
> plugin/index.html
>
> I had planned on adding other scripting-related muck here, though  
> turns out that Groovy was all I needed, so the name is legacy.  Its  
> basically a much more configurable/flexible implementation of:
>
>     http://mojo.codehaus.org/groovy-maven-plugin/
>
> AFAIK, BSF-like execution isn't rich enough, unless I re-write the  
> engine to allow customizing the classpath/scriptpath, etc... and  
> even then I'm not sure it will cut it.
>
> This is *not* for writing mojos, but for allowing groovy Scripts to  
> be run inside of Maven.  The difference might be a bit subtle, but  
> there are some times when you just need a tiny bit of scripting to  
> solve a problem, and the work to create a Maven plugin, vote/stage/ 
> release it so that it can be used is just not worth the trouble.
>
>  * * *
>
> I still have some of the work I did to make richer Groovy plexus  
> components around too, which is to help make Mojo's with Groovy,  
> but I have not had time to deal with merging my bits into the bits  
> under Mojo's mojo-sandbox/groovy-maven-tools stuff.  This stuff is  
> more along the lines of the Beanshell and Ruby mojo support stuff  
> you are refering too... ie. writing Maven plugins with Groovy.  But  
> the groovy-maven-plugin (script-maven-plugin in Genesis) are  
> focuses not on building plugins, but allow projects to invoke small  
> Groovy scripts (or bigger ones, as it the case with the Geronimo  
> TCK harness).
>
> --jason


Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Jason Dillon <ja...@planet57.com>.
On Feb 24, 2007, at 5:54 PM, Jason van Zyl 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 script-maven-plugin is really just an advanced groovy-maven- 
plugin which I whipped up to support getting better scripting into  
Maven, which we now use extensively in the TCK harness.

     http://geronimo.apache.org/maven/genesis/plugins/script-maven- 
plugin/index.html

I had planned on adding other scripting-related muck here, though  
turns out that Groovy was all I needed, so the name is legacy.  Its  
basically a much more configurable/flexible implementation of:

     http://mojo.codehaus.org/groovy-maven-plugin/

AFAIK, BSF-like execution isn't rich enough, unless I re-write the  
engine to allow customizing the classpath/scriptpath, etc... and even  
then I'm not sure it will cut it.

This is *not* for writing mojos, but for allowing groovy Scripts to  
be run inside of Maven.  The difference might be a bit subtle, but  
there are some times when you just need a tiny bit of scripting to  
solve a problem, and the work to create a Maven plugin, vote/stage/ 
release it so that it can be used is just not worth the trouble.

  * * *

I still have some of the work I did to make richer Groovy plexus  
components around too, which is to help make Mojo's with Groovy, but  
I have not had time to deal with merging my bits into the bits under  
Mojo's mojo-sandbox/groovy-maven-tools stuff.  This stuff is more  
along the lines of the Beanshell and Ruby mojo support stuff you are  
refering too... ie. writing Maven plugins with Groovy.  But the  
groovy-maven-plugin (script-maven-plugin in Genesis) are focuses not  
on building plugins, but allow projects to invoke small Groovy  
scripts (or bigger ones, as it the case with the Geronimo TCK harness).

--jason

Re: Moving plugin-support bits out of Genesis into Mojo?

Posted by Jason van Zyl <ja...@maven.org>.
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?

>
> Does anyone object to moving these bits to the Mojo project?  I'm  
> actually working on this at the moment, but if there are objections  
> I will stop and we can discus more if needed.
>
> --jason
>