I got a question regarding OSGI Bundles and "normal" maven jar dependencies.
The following scenario:
A multi module maven project: A
with the modules A.X, A.M:
A.X is a OSGI Bundle
A.M is normal java application that launches the OSGI framework and loads the bundle A.X
In the project top-level pom (A.pom) I define a dependency to commons-logging-1.1.1 Then I use commons-logging in my OSGI Bundle A.X. The maven-bundle-plugin generates the manifest for A.X with an import entry where 'commons-logging' occurs.
When I start A.M and print out all my loaded jars (with getSystemClassLoader...) on the console then ../../../commons-logging-1.1.1.jar is listed. Because of the maven-dependency from the top-level pom.
Now I try to install my OSGI bundle A.X and get a "unresolved constraint in bundle.....commons-logging" exception.
Why can´t the commons-logging dependency (from A.X) be resolved with the commons-logging lib that is already in memory (in A.M) when the bundle is installed?
I am grateful for any help!!!!