I have a fragment that exports additional packages from the system bundle to support various 3rd party JARs, as described here:
http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/ (solution A').
This used to work.
Today I updated some of my other bundles (not the system bundle extension) and it no longer builds. Here's my bnd file:
Fragment-Host: system.bundle; extension:=framework
sun.security.action,\
sun.misc,\
com.sun.org.apache.xpath.internal.jaxp,\
com.sun.management,\
com.sun.image.codec.jpeg,\
com.sun.medialib.mlib,\
javax.swing,\
sun.awt.image,\
sun.awt.image.codec,\
sun.security.action,\
org.w3c.dom,\
javax.xml.transform,\
javax.xml.namespace,\
com.apple.eio
Bundle-Version: 1.0.3
Here's the error message:
Exporting packages that are not on the Bundle-Classpath[Jar:dot]: [sun.security.action]
At this point the bundle is built but the Export-Package *only* contains sun.security.action... which is a little strange given the message. I thought it would be the inverse!
If I remove the sun.security.action then I get the following three warnings:
1)
Instructions in Export-Package that are never used: javax\.xml\.namespace
sun\.nio\.ch
com\.apple\.eio
sun\.misc
sun\.awt\.image
org\.w3c\.dom
javax\.xml\.transform
sun\.security\.action
com\.sun\.image\.codec\.jpeg
com\.sun\.org\.apache\.xpath\.internal\.jaxp
javax\.swing
com\.sun\.medialib\.mlib
com\.sun\.management
sun\.awt\.image\.codec
Classpath: Jar:com.elsten.bliss.osgi.system
2)
Superfluous export-package instructions: [com.sun.management, sun.awt.image, com.sun.medialib.mlib, org.w3c.dom, javax.xml.namespace, com.sun.org.apache.xpath.internal.jaxp, sun.security.action, com.sun.image.codec.jpeg, javax.swing, javax.xml.transform, sun.awt.image.codec,
sun.nio.ch, sun.misc, com.apple.eio
3)
Unknown directive extension: in Fragment-Host, allowed directives are resolution:, and 'x-*'
And no Export-Package ends up in the MANIFEST.
bndtools v1.0 this time...
Anybody have any ideas? Tried cleaning, rebuilding, closing project, opening, restarting Eclipse. The packages appear in rt.jar (at least, the one I think it's using).
Dan