Reputation: 455
In my osgi project I have maven-bundle-plugin with instructions to import some path, for example: org.blah.blah.* And I have two other bundles that export such package. How to configure my bundle to import org.blah.blah.* from both of them?
Upvotes: 8
Views: 1498
Reputation: 9384
You can't import a given package name from more than one bundle. What you could do is Require-Bundle both bundles which will give your bundle access to both packages as a split package with all the inherent issues of split packages and Require-Bundle. See 3.13.3 in the OSGi Core Release 5 spec.
Better would be to refactor (if you can) to avoid split packages.
Upvotes: 11