If I understand your issue correctly, it is just a matter of providing the correct dependencies chain to be resolved by OSGi.
Your libraries should export packages that your services will import.
If BundleA requires classes from BundleB and OtherBundle, adding Import-Package and Export-Package metadata in the MANIFEST.MF of all bundles should be sufficient.
BundleA MANIFEST.MF
Import-Package: my.required.package.from.b, other.package.in.b, other.package
BundleB MANIFEST.MF
Export-Package: my.required.package.from.b, other.package.in.b
OtherBundle MANIFEST.MF
Export-Package: other.package
Then install all bundles, they will be in INSTALLED
state. Start the main one (BundleA in this example).
OSGi will resolve all dependencies (just be careful not to have cycles) and bundles will go in RESOLVED
state (dependencies available) and then ACTIVE
.
You don't need to manually add those dependencies, tools like maven-bundle-plugin can be easily configured.
Also this question What is the natural start order for package-dependent OSGI bundles may be useful.