Our company produces a number of Java / Scala libraries for use by our Research department. A researcher will typically interact with these libraries from a Matlab environment, maintaining a classpath to accommodate the various library dependencies.
The libraries are typically produced by different developer teams and hence the dependency management is somewhat fragile. Also, we’re not in a position to set up a firm-wide continuous integration system due to time constraints and the fact that some code is proprietary.
My question: Is there a tool / mechanism for packaging a Java library (or application) in such a way that its library dependencies are isolated from other libraries? (e.g. by using a dedicated classloader). I’m thinking something along the same lines as a .war file whereby the unit of deployment is self-contained and hence dependencies / dynamic class-loading are all hidden.
This sounds like a great use case for OSGI. Each OSGI module can have its own dependencies, which may be different version of the same library. Using OSGI would also provide the benefit of being able to pick and choose which modules to use, depending on the user (researcher).
The technology can be used in both desktop and server applications, so its pretty robust.
Some reference material:
Felix