Hi all,

I have an incertainty regarding the "uses" directive in Export-Package
manifest headers: The current 1.1.0 SNAPSHOT of the Bundle Plugin (also
the 1.0.0 release) creates a "uses" entry for each referenced package of
a class.

Consider now two packages org.sample and org.sample.impl. The org.sample
package is exported, the org.sample.impl package is private and not
exported. If a class in the org.sample calls into a class of the
org.sample.impl package, the bundle plugin generates an export statement
for the org.sample package:

    Export-Package: org.sample;uses:="org.sample.impl"

Is this correct ?

If I understand it correctly, listing a package in the "uses" directive
is not required, as long as the package does not occurr in any method
signature or field type. In fact, I think the use of the org.sample.impl
package is an implementation detail, which should not be "leaked" into
the Export-Package statement.

Any hints or help ? Thanks.

Regards and a happy new year
Felix

Reply via email to