make jars to osgi compaible bundles#81
Conversation
Signed-off-by: Stefan Bischof <[email protected]>
Signed-off-by: Stefan Bischof <[email protected]>
|
Thanks for this. Very happy to change the MANIFEST.MF file, however, I don't want to add any additional dependencies. From a quick look at this, it would appear this would be relying on OSGi for service loading rather than the standard JDK ServiceLoader? I rely on ServiceLoader to resolve the device factory as well as the detected board. |
|
I let you service loader ability as it is. I just used annotations to allow that workl in osgi. This adds just requirements and capabilities to the manifest. Also other Things i like to add does not add additional dependencies. The annotations only exist are processed at buildtime. Have a look on the import package Header in the manifest. Just you dependencie exist. I |
This is the first step to make your core jar file to a bundle that is usable in an osgi framework.
Are you open for such an PR? If yes, tell me an i will complete this.
Using bnd to generate osgi compatible bundles and auto-generate jpms and services files using annotations.
OSGi Bundle Manifest
Bundle-NativeCode:META-INF/services
module-info (optional) bnd doc jpms
-
-jpms:instructionManifest
BEFORE:
AFTER:
Optional generated module-info.class