Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSGi:export a package without exporting a few Classes within the same package

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.

like image 432
Leo Prince Avatar asked Sep 30 '22 02:09

Leo Prince


1 Answers

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.

like image 88
BJ Hargrave Avatar answered Oct 04 '22 19:10

BJ Hargrave