I've a jar(sample;version=A) needed by my OSGi application and i've to use the same jar(sample;version=B) to a newer bundle i develop.
The sample jar has some enhancements so i couldn't just upgrade the existing bundles to align to version=B.
I decided to add Sample with version B as a embedded dependency, so the newer bundle i develop refer to the latest version whereas the existing bundles runs with version A. Don't want to bring both the versions to run-time at the moment.
<Embed-Directory>lib</Embed-Directory>
<Bundle-ClassPath>.,lib</Bundle-ClassPath>
<Import-Package>*</Import-Package>
<Embed-Dependency>sample;scope=compile|runtime</Embed-Dependency>
At runtime only the older version of sample(version=A) is always referred. Is there a way the embedded-dependencies are made to refer by the bundles than taking from runtime exported packages?
Edit1: I also could see the packages present in sample are part of private-packages. Can the application made to refer to the private packages than referring to the runtime packages given by the OSGi container.