A tool to determine jar dependencies based on existing code?
Posted
by geoffeg
on Stack Overflow
See other posts from Stack Overflow
or by geoffeg
Published on 2010-06-02T18:39:09Z
Indexed on
2010/06/02
18:44 UTC
Read the original article
Hit count: 204
Is there a tool that can determine .jar dependencies given a directory of .jar files and a separate directory of java source code? I need to generate Eclipse .classpath files based on an existing code base that doesn't have any dependencies defined.
To be more specific, I've been given a large codebase consisting of a dozen or so J2EE-style projects and a single directory of jar files. My client uses a custom development and build framework that is just too arcane for me to use and get any real work done. The projects do not have any information about their dependencies, either between projects or to jar libraries.
I would expect this tool would have to spin through each jar file, indexing the classes available in that file and then go through each file in the project source code tree and match up the dependencies, possibly writing out a .classpath file with the required jar files. I realize this is a rather simplistic view of the operation, as duplicate classes among the jar files and such might make things more difficult.
© Stack Overflow or respective owner