A few months ago I wrote an article about using Ivy to jump-start new Java applications. Since then I have used Ivy in all the new components which often have dependencies between themselves or third-party libraries sometimes open source, sometimes proprietary. This article is about new insights from this experience and the more general issue of application modularization.
Application modularization is a hot topic in the Java community. A concise and good article by Alex Blewitt is: Modular Java: What Is It?. It is easy to see the dependencies being a problem in large applications, but it affects small/medium scale applications as well. In these days it is easy to create a component/application that depends on a dozen of external libraries. Modules can depend on each other at compile-time and runtime. For compile-time dependencies there is no standard specification, instead ad-hoc formats have been defined by development tools: POM for Maven and Ivy files for Ivy. For run-time dependencies the current standard is OSGi implemented by the major J2EE application containers.
It is easy to see how a development team can be easily confused and frustrated by the topic of modularization. On one hand this is a common issue: new components are build and new versions are released by other teams and external parties. Compile-time dependencies are managed inside build scripts, and hard to maintain. For run-time dependencies, the standards (OSGi) and tools (Eclipse, bnd) are too complex to the point where only the tool providers are able to use them.
For the people who want to go beyond manually maintained classpath entries, I am suggesting to a combination of Ivy and jar MANIFEST files.