Is that possible to reexport only part of a dependency plugin?
I mean ...
Plugin_1 has 3 exported packages
com.p1
com.p2
com.p3
When I reexport Plugin_1 I don't wanna reexport the package "com.p2". Is there some way to do that?
*It is important to say that Plugin_1 cannot be changed!
Why this: Plugin_1 is a legacy plugin that cannot be touched. It has bunches of classes that I wanna provide through a single brand new plugin (eg: Plugin_New) with reexport OSGI feature, but some of these reexported classes (the ones on "com.p2" package ) should be hidden cause I wanna clients using the new classes I just create on the new plugin. Plugin_1 code refactoring is out of question cause it still being used by other systems.
In OSGi, re-export is a concept or Require-Bundle. Require-bundle is in almost all cases a really bad idea
.
If you you just use Package-Imports and -Exports then any problem you might have in this area magically disappears. :-)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.