Chris Nokleberg has answered Hani’s desire for a simple tool to find dependencies between two codebases. He hacked JarJar to do just this.
He shows the example of:
$ java -jar jarjar.jar –find –level=jar j1.jar:j2.jar:j3.jar:j4.jar
giving you:
commons-beanutils-1.6.1.jar -> commons-collections-3.1.jar
commons-betwixt-0.5.jar -> commons-digester-1.5.jar
commons-betwixt-0.5.jar -> commons-beanutils-1.6.1.jar
commons-betwixt-0.5.jar -> commons-collections-3.1.jar
commons-cli-1.0.jar -> commons-lang-2.0.jar
commons-codec-1.2.jar -> commons-codec-1.3.jar
commons-dbcp-1.2.1.jar -> commons-pool-1.2.jar
commons-dbcp-1.2.1.jar -> commons-collections-3.1.jar
commons-digester-1.5.jar -> commons-collections-3.1.jar
commons-digester-1.5.jar -> commons-beanutils-1.6.1.jar
commons-jxpath-1.2.jar -> commons-beanutils-1.6.1.jar
commons-pool-1.2.jar -> commons-collections-3.1.jar
commons-validator-1.1.3.jar -> commons-collections-3.1.jar
commons-validator-1.1.3.jar -> commons-beanutils-1.6.1.jar
commons-validator-1.1.3.jar -> commons-digester-1.5.jar
Very nice. IMO, tools like these should be in the JDK itself. The graph that he has on his blog would also be very helpful.
In some ways I also would like to have a way to have a jar file show a dependency to another component library in a maven-esque way (I want the module foo, version 1.4) rather than Class-Path: /some/path/to/it. That would cut down on the libs that are laying around (although you end up having most of them in your MAVEN_REPO instead of all of your lib dirs if you go that way! Much better)