Hi all,
using bndtools 3.3.0 we ran into an issue where bnd fails to
automatically generate a corresponding import package for an exported
package when a class in the exported package uses a class from a
private package.
Eg. the resulting manifest looks like this:
Manifest-Version: 1.0
Bnd-LastModified: 1492168735547
Bundle-Activator: foo.bar.impl1.Activator
Bundle-ManifestVersion: 2
Bundle-Name: foo.bar.impl1
Bundle-SymbolicName: foo.bar.impl1
Bundle-Version: 0
Created-By: 1.8.0_111 (Oracle Corporation)
Export-Package: foo.bar.api1;version="1.0.0"
Import-Package: org.osgi.framework;version="[1.8,2)"
Private-Package: foo.bar.impl1,foo.bar.util
Require-Capability:
osgi.ee;filter:="(&(
osgi.ee=JavaSE)(version=1.8))"
Tool: Bnd-3.3.0.201609221906
So although the bundle builds without warning or errors and runs and
resolves, it does not "import what you export" resulting in potential
wiring issues.
Explicitly adding the package to the import package list does resolve
it, but this may be a bnd issue?
Example project:
https://github.com/bramk/bnd-iwye
Thanks,
Bram