File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes jar management techniques Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "jar management techniques" Watch "jar management techniques" New topic
Author

jar management techniques

Mark Lybarger
Ranch Hand

Joined: Dec 19, 2003
Posts: 72
we have a project that consists of an ejb module and a web module. the ejb module uses some 3rd party jars that are made available in the ear via the ejb jar's manifest.mf. our current practice and setup is to put all jars into our project sources's WEB-INF/lib folder. when building the ejb module, we try to include only the needed jars for that module. the web module still gets left with all the cruft. we have also put in build time tools (cactus jars, xdoclet jars, etc) into the web-inf/lib folder.

it's time to clean up that web-inf/lib folder. it has grown to 25MB in size. one main problem is that we really don't know what in there is required for the web tier. years back, the project started with a turbine framework (TDK) that included a lot of unneeded jars in it's web-inf/lib directory, just in case you were to use them. and we've added to it over the time, and don't have a very good history of each jar ( we've migrated version control software from VSS to CVS and restoring VSS is challenging ).

i'm looking for suggestions, ideas, examples and common practices for managing 3rd party libraries. we're using ant for our build tool. just recently, our team created a folder utility/ant to store some ant build specific libraries. that's about the best we've gotten thus far to keep cruft out of the web-inf/lib folder.

any suggestions/ideas would be most appreciated.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Well, I can only tell you what we are doing.

We are working on a project that consists of around 80 modules - some core functionality, some Swing client, some web client, some customizations for specific customers. Depending on the customer they a distribution consists of different combinations of those modules.

We have one big ThirdParty module containing all the thirdparty jar files, organized into a hierarchical, thematical folder structure.

Each module defines which thirdparty library it needs, via logical names (each name mapped to one or more jars). Our ant script gathers the needed jars during a distribution and copies them into the correct folders.

Does that help?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Mark Lybarger
Ranch Hand

Joined: Dec 19, 2003
Posts: 72
definately. it seems like quite a bit of work for us to setup, but would probably be beneficial in the long run.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Mark Lybarger:
it seems like quite a bit of work for us to setup


Well, we didn't came up with that in one day, either. In fact in my experience, the build system needs ongoing care, as anything else. Jutta Eckstein once said that in her experience around of one tenth of development time needs to go into the build system. That matches my experience quite well.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jar management techniques