If you absolutely need to have multiple versions of the same dependency, you probably need to use OSGi.