5

I am working in a OSGi project where we need to export a package in bundle but we do not want to export a two specific class of this bundle. To give more background, we use a third party jar that is not osgi bundle so we add this as a part of OSGi bundle and in this third party jar we need to export a package "A" but this package A has two specific classes that we do not intend to be exported. Please give your suggestion on the way to achieve this.

Naveen Raj
  • 801
  • 11
  • 26
Leo Prince
  • 940
  • 2
  • 14
  • 33

1 Answers1

4

Export-Package: some.package.name; version=1.0; exclude:="ClassA,ClassB"

See sections 3.6.5 and 3.7.9 in the OSGi Core specification.

BJ Hargrave
  • 9,324
  • 1
  • 19
  • 27