Search code examples
apache-camelosgijbossfuse

Can an osgi bundle import packages from different versions of the same dependencies?


I have built a JBoss fuse project which is deployed as a single bundle.One of the packages in my project is dependent on a dependency called pdfbox which is of version 2.0.8,where as another package is dependent on the same pdfbox which is of version 1.8.13.Is it possible to have my bundle use both the dependencies at the same time?If so please guide me on doing it!


Solution

  • A bundle can only import a package from one source (exporter). It is not possible for a bundle to import multiple versions of the same package. Of course, different bundles can import different versions of a package.