You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jc...@21technologies.com on 2007/05/21 23:57:19 UTC

POMs for Third Party Libraries

What is the best way to deal with third party libraries that are not 
released as maven 2 projects?  I know about the install and deploy 
plug-ins, but I am worried about dependency management.  A lot of the 
third party libraries we use have the following problems:

1) Some of the library's dependencies are only needed for specific 
functionality (ie a db library only needs the postgres jars when used with 
postgres)
2) The library is distributed with unversioned jars
3) The library is distributed with nightly or dev build jars

So far, our solution has been to create a custom pom with all the 
dependencies marked as optional dependencies.  This negates the benefit of 
transitive dependencies, but since these are third party libraries it is 
very hard for us to tell what is truly required.  At least with optional 
dependencies, the pom file itself contains clues about the dependencies. 

For unversioned and nightly or dev build jars, we have been adding them 
with the groupId of the third party library and appending the name and 
version of the third party library to the dependency.  Does this sound 
like a good solution or does anybody have a better one?  We are trying to 
avoid losing the original jars distributed with the library.

Thanks,
Joon Chuah