This is why every bundle should have package-import statements covering all packages it exports. That way, if 2 bundles offer the same code (which happens frequently) the OSGi classloaders make sure that only 1 version is used throughout the JVM.
This is the maven-bundle-plugin' s default behaviour. See http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
"<Import-Package> is assumed to be "*", which imports everything referred to by the bundle content, but not contained in the bundle.
Any exported packages are also imported by default, to ensure a consistent class space."