Question

I am trying to start a bundle, with a whole bunch of dependencies. I am getting the error could not be resolved. Reason: Missing Constraint: Import-Package: com.ibm.uvm.tools, but cannot find this package in the maven repos or on the web. By marking this package (and a bunch of others) optional in the Import-Package directive, I can resolve the package, but it fails to start if the dependencies are not met. What can I do to resolve this Import-package?

I am using the maven-bundle-plugin to generate the bundle.

Was it helpful?

Solution

Solution was to use a OSGified version of log4j as provided dependency. I had it as a compiled dependency. Log4j manifest mentions this package as an optional depndency, so maven-bundle-plugin added it to my bundle's manifest, but did not make it optional.

OTHER TIPS

You have built your bundle with a couple of jars on the classpath. Otherwise your bundle would not reference anything in a package named com.ibm.uvm.tools. Now you need to see whether or not this jar is OSGi-ready (specifying the correct headers and package-exports). Maybe there also exists a 'OSGi-fied' version of that jar, have look at the springsource repository for example.

Looking at the package name, I assume the probably proprietary code that cannot be found re-wrapped in any public repository, then you may try to wrap it as a bundle yourself , having a look at this stackoverflow question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top