cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SAXESS - Hussayn Dabbous <>
Subject Re: Single JAR with all the libs? -> rejar the distrib ...
Date Sun, 26 Jan 2003 12:43:48 GMT
If i understand you correct, you simply want to avoid deploying
several cocoon-based webapps all containing tons of the same
jar files ?
And in order to keep your customers happy, you want to simplify
the deployment by bundling all cocoon jars into one big jar,
deploying this golfball.jar independently from cocoon into your
Then your webapps get significantly smaller because
you only have to deploy the cocoon configs and the webapp
specifics ...?

If this is what you want, you can do it in two ways:

this is a very simplistic approach with some caveats, but
it works. There may be a license problem here, but i
don't know this for shure:

1.) unwar your cocoon distribution to any convenient place
2.) go to the WEB-INF/lib directory
3.) Now for each jarfile in the directory simply do:
     jar xf thefile.jar
     Of course you may skip all jars you dont need for your
     distribution ...
4.) throw away the .jar files
5.) jar cf golfball.jar *

Now you have one single jar file, that you can distribute to
whereever your container needs it to serve as common cocoon
classes for your webapps.

Finally you could repack the cocoon.war from step 1.) without
the lib/*.jar files, add your webapp specific data (config/files/
programs) and deploy the result as co-webapps into your container ...

But you have to keep one caveat in your mind:

You may fall into strongly hidden compatibility issues when
your webapps use other versions of the .jar modules you just
have bundled to allclasses.jar

If you take the single jars as they are, at least you can easier
track down which module (.jar file) causes compatibility issues.
And you can easier exchanche module jars if needed although i
must admit, sometimes exchanging one jar out of a bunch may not
be trivial at all ;-)
The golfball.jar only allows to determine, which classes cause


If you are under unix, you can reach your goal by clever use of
In my development environment we sometimes have to run 5 to 10
cocoon-based webapps all across multiple platforms, multiple
containers and so on. And we found a nice solution, that fits for
our purposes. If this is something, anyone would be interested in,
we could share knowledge here, but since this is kind of special
i wouldn't bother this list and do this offline.
just drop me an email.

regards, hussayn

hope, that helps

Robert Simmons wrote:
> Is there a way to compress all the cocoon jars into one jar so I can 
> just drop in my application server like a golf ball and all cocoon 
> deployments will have access to it ?
> -- Robert

Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message