Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar management techniques

 
Mark Lybarger
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Mark Lybarger
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic