geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olaf Bergner <>
Subject Re: Suggestion to improve packaging of ejb-jars
Date Wed, 18 Mar 2009 22:23:26 GMT

Obviously, adopting the Geronimo way of explicitly declaring a module's
dependencies as references to jars contained in Geronimo's repository is the
most explicit way of making that module's needs known to the world. On the
other hand, it may be argued that packaging dependencies that are only
needed by one module inside that module is still closer to the "truth" than
throwing them all indifferently into the enclosing ear's lib directory.

Moreover, it is precisely my use of maven and my meticulously managing my
dependencies that led to this suggestion. I rely on maven's dependency
management capabilities to automatically compute each module's classpath,
leading to the scenario I described in my original post.

Anyway: is there a maven plugin that allows me to convert my ear into a
Geronimo plugin, using maven's knowledge about the required dependencies to
automatically build the required environment entries?


djencks wrote:
> On Mar 18, 2009, at 2:33 PM, Olaf Bergner wrote:
>> I have several ejb-jar packaged inside an ear. Libraries to be  
>> shared between
>> some or all of these ejb-jars are placed inside the encompassing  
>> ear's "lib"
>> directory, as decreed by the standard. Some libraries, however, are  
>> local to
>> the using ejb-jar, i.e. they don't need to be shared.
>> I tried to package these libraries inside the using ejb-jar, creating
>> appropriate Class-Path entries in that ejb-jar's manifest file. This,
>> however, leads to a deployment error as obviously the Class-Path  
>> entries in
>> the ejb-jar's manifest file are resolved relative to the enclosing  
>> ear and
>> are therefore not found.
>> Suggestion: make Geronimo resolve those dependencies relative to the  
>> ejb-jar
>> declaring them. Same goes for rars.
>> What do you think?
> rars already have a nested structure, anything inside has to be in a  
> jar.  Or are you suggesting we support infinitely nested jars?
> In geronimo everything in all the ejb jars and rars ends up in the  
> same classloader so you won't get any difference in behavior by doing  
> this.
> I'm generally against these nested packagings.  I think they were  
> dreamed up in the dark ages before people realized that their software  
> was part of the worldwide software ecosystem and that you need to  
> document explicitly how your software relates to other stuff.  This is  
> the kind of problem maven tries to solve.  People who still use ant  
> IMO still haven't recognized that this is something they can think  
> about.
> So, in geronimo I recommend packing as little as possible in an ear,  
> instead using dependencies to include the same jars from the geronimo  
> repo into the appropriate classloaders.
> thanks
> david jencks
>> Cheers,
>> Olaf
>> -- 
>> View this message in context:
>> Sent from the Apache Geronimo - Users mailing list archive at  

View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message