Creating Wrapper Bundles
Before you can publish plain jar files to the server, you must create one or more wrapper OSGi bundles for the plain jar files.
To create a wrapper bundle for one or more plain jar files
1. In Designer, go to the Bundle Manager view.
2. Select the plain jar or jars for which you want to create a wrapper bundle.
If you attempt to create a wrapper bundle for an OSGi bundle file, you will receive an error. You can only create wrapper bundles for plain jar files.
3. Click . 4. In the Create an OSGi bundle page of the Create Bundle for Selected Jars dialog specify the provided settings.
The following table describes what you have to specify for each setting.
For this setting | Specify |
Bundle Type | One of the following: Unwrapped - to unwrap the contents of selected jar(s) in the root directory of generated bundle. Embedded - to embed the selected jar(s) in the generated bundle. Important: If you have selected more than one jar file, make sure that each jar contains a set of files with unique names to prevent files from one jar to be overwritten by files from the other jar. If you are converting a signed jar file, Software AG recommends that you use the Embedded option to ensure that the integrity of the signed jar is maintained when wrapping the jar as a bundle. |
Bundle Symbolic Name | A symbolic name for the bundle. |
Bundle Version | A bundle version. |
Directory | Select the required directory from the drop-down list box. If the required directory is not available, add the directory from the Bundle Manager settings. |
5. Optional. Click Next. On the Bnd Classpath Settings page select one or more jars to be added to the classpath when building the bundle.
The selected jars are added to the -classpath Bnd directive as absolute URIs.
6. Optional. Click Next. On the Bnd Template Settings page edit the bundle manifest content before building the bundle.
For information about the syntax and supported options of Bnd templates, see
http://www.aqute.biz/Bnd.
7. Optional. Click Next. On the OSGi bundle manifest page update the contents of the bundle manifest, if required.
The manifest contents must comply with the general specification for jar manifest files. For information about the jar manifest specification, see the Oracle documentation.
8. Click Finish.