Problem:
I have a large, old, disorganized java project from the early 2000s.
The project is built using ant.
There is no dependency management, everything is handled by storing jars locally.
The compile
and package
targets for the build script are very broad, and mostly just compile and subsequently package the entire project, shuffling environment specific properties files around as needed.
At some point during the lifespan of the project, a few separate build targets were introduced, to enable a web interface for admin tooling and the like.
However, because there is no dependency management, and because the buildscript isn't very selective, the current process is packaging up the entire web application and deploying it along with the admin tools, with a very minimal list of differences between the two.
I am currently embarking on attempting to bring sanity to the codebase by deprecating and re-factoring the ant buildfiles and introducing build/deployment automation by way of CI tooling.
As a part of the next phase of this effort, I would like to attempt to refactor the project structure and the buildfiles to only package what it needs to package in the war files for the admin tools and production web-application, respectively, and hopefully, only compile one pass instead of several.
To solve this problem it seems likely that I will need to build a list of dependencies for a given JSP, or at least a list of java classes. Manually doing legwork to track some stuff down is hardly beneath me, but the scope of the project is large enough that without some automated assistance I have no hope of ever completing the task in a reasonable timeframe.
I have yet to find a solution to this that doesn't involve a hefty software license or a project that is already using Maven.
Given that Eclipse can take an arbitrary method from an arbitrary file of source in this project and find me the resource on the file-system that corresponds, it seems as though this must not be an unsolvable engineering quandary -
Does there exist a free (as in beer, ideally also as in software) solution to generating a dependency graph (or similar) for a project like this?
Failing that, can the good citizens of stack overflow suggest a different approach to my problem I may not have considered?