My project uses Java libraries that have their own dependencies (Hadoop, Jetty for example). I end up with different versions of the same dependencies, like ant 1.4.5, 1.4.6. My project may want to use ant 1.4.7. This is a small example, can get more complicated with larger dependencies like HTTP Commons.
How do I get all the libraries and dependencies to play nice? Is there a way to isolate each library (Hadoop, Jetty) so they only use their dependencies?
Maven will also generally handle this pretty well. If not completely, it will at least handle the bulk of it, then you can sort out the issues that are left over.
Of course that means that you have to change your build process, but it might be worth your while for not pulling your hair out over this.
JarJar to the rescue!
An ant taks that both 1) packs many jars into one, and 2) allows you to rename dependencies in class files and thus load two versions of the same library!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With