« Return to Thread: Maven core : Plexus vs Spring / OSGi ?

Re: Maven core : Plexus vs Spring / OSGi ?

by Jason van Zyl-2 :: Rate this Message:

Reply to Author | View in Thread

On 2-May-08, at 5:53 AM, nicolas de loof wrote:

> [
> ----------------------------------------------------------------------------------------------------------------------------
> ]
> Note to plexus lovers :
> CONTROVERSAL PROPOSAL, please don't blame me and just give good  
> arguments !
> [
> ----------------------------------------------------------------------------------------------------------------------------
> ]
>
> Maven is built on Plexus. This lightweight container is used (afaik)  
> for :
> - simple (javadoc) annotation-based programming model

There are java5 annotations which Jason Dillon wrote, and they are  
available for Mojos as well in the model that Yoav has placed JIRA.

>
> - lifecycle management
> - dependency injection
> - classloader isolation for plugins (using classworld)
>
> Let's now consider the today responses to the same requirements :
> - Since Java5, annotations are common, and JSR-250 introduces standard
> annotations that can address some basic lifecycle and IoC  
> requirements.
> - The IoC container ecosystem is dominated by Springframework. Maybe  
> not the
> best technical one for any reason, but the best documented and most  
> know by
> developers.

I think it's really more then the JSR about a component model which is  
now a little race between Spring, Guice, and OSGi. What's more  
important, as Paul Hammant will also argue, is the interoperability of  
the components. Important things like making the embedder usable in a  
OSGi environment. These are the things that really matter.

>
> - Classloader isolation is very well adressed by OSGi, with the  
> advantage of
> beeing a recognized standard, with many documentation AND business  
> interest.
>

I'm definitely interested in the OSGi model for classloaders and I've  
had more then one conversation with Jeff McAffer.

> Maybe Plexus was a very advanced container when it was created, but  
> it did
> not become the today 1rst choice technology.
>

OpenEJB is using XBR, Geronimo is using XBR, and I'm happy using XBR  
which is a project here at Apache where the degree of collaboration  
can be much higher. What XBR is capable of is simply amazing, that it  
was possible to swap in another DI engine without a _single_ change to  
Maven is amazing. I am also more interested in collaborating with the  
Pico community and bring together their world with ours.

> Considering an opensource tool like maven is built by volunteers  
> developers,
> it would be a good thing to attract talentuous ones to use up-to-
> date and
> well known technologies. As an example, Archiva (trunk) is migrating  
> to
> Spring as it's IoC container.
>

XBR is certainly up-to-date and probably one of the most advanced DI  
libraries there is, Dain is at hand to help and he just finished doing  
a lot of work to bring the DI capabilities up to the most advanced  
there are.

I would counter Archiva with Nexus which is using Plexus and I believe  
this makes it more flexible and will integrate with Maven far better.  
I also have never bought the argument that what's popular is what's  
best. Maven wouldn't exist if that were the case. There's always room  
for competitors.

> Could we consider for future maven version (let's say 2.2, or "3.0"  
> - as 2.1
> is allready in advanced development phase) to replace plexus with a
> combination of Java5 + Spring + OSGi ?
>

Java5 absolutely, that exists now and with the integration of XBR  
there are no limitations. As far as Spring, that's honestly never  
going to happen while I'm here because I will always argue that  
something like XBR/Guice which is a DI library is more appropriate and  
there is nothing Spring can do that XBR cannot do today in terms of  
dependency injection. OSGi classloaders are definitely an option and  
Eugene and Igor of m2eclipse already have some very cool tools that  
are akin to Spring DM.

And ultimately the container DI is not the important part but the  
implementations of our components. Using standard annotations for that  
is a good thing and that's not hard. XBR does full JEE injection and  
can manage any sort of annotation based DI because it's entirely  
agnostic. At any rate full support for that is now possible with XBR.

> Nicolas. What

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

A man enjoys his work when he understands the whole and when he
is responsible for the quality of the whole

-- Christopher Alexander, A Pattern Language




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: Maven core : Plexus vs Spring / OSGi ?