开发者

Bundle's exported packages not visible

I have a bunch of eclipse plugins that depend on a bundle that contains some third-party jar/dll resources, and exports the packages those resources contain. When I export and drop all this into eclipse/plugins, the plugins work perfectly. However, when I make a new plugin dependent on my resource bundle in this new workspace, I can't see it开发者_如何学Gos exported packages. I can't seem to find them at all.

The resource bundle's manifest looks like this:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MyBundle
Bundle-SymbolicName: MyBundle
Bundle-Version: 1.0.0
Bundle-ClassPath: res1.jar,
 res2.jar,
 res3.jar,
 .
Export-Package: com.stuff.res2,
 com.stuff.res1,
 com.stuff.res3
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

I've gone through the checklist in this related thread, with no luck. After some additional googling, I found a workaround where I can import my bundle as a project into the workspace (Right-click on my bundle in Plug-in Browser --> Import As --> Source/Binary Project). I'd like to avoid creating this extra project though, if at all possible.

edit: Eclipse bug 259959 looks like it might be related, but not quite the same setup as me.

Any help would be really appreciated!


Don't create a library bundle filled with other jars. This won't work as you want it to. In addition to the solutions offered in that link, you can also create your own bundles from the library jars as well. Eclipse has that option to create from existing jar, of course this means a new bundle for each jar, but that would be the proper way of doing it anyway in an OSGi environment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜