4

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.

Midhat
  • 17,454
  • 22
  • 87
  • 114
  • 1
    What bundle are you trying to install? What error do you get when you make the package optional? When I google "uvm tool" google actually suggests the package you are looking for, so I really wonder how you could not find anything. – Björn Pollex Nov 27 '12 at 16:18

2 Answers2

3

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.

Midhat
  • 17,454
  • 22
  • 87
  • 114
2

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.

Community
  • 1
  • 1
benjamin
  • 1,066
  • 11
  • 22