Manifest files
The metadata for an OSGi application is defined in manifest files. An OSGi bundle contains a bundle manifest; a composite bundle archive (CBA) contains a composite bundle manifest; an enterprise bundle archive (EBA) contains an application manifest; an EBA asset contains a deployment manifest. The deployment manifest is generated automatically when the EBA file is imported as an asset. Create the other manifest files when we create the bundles or application.
Subtopics
- Example: OSGi bundle manifest file
An OSGi bundle, which can be a JAR or web application archive (WAR) file, contains a bundle manifest file META-INF/MANIFEST.MF. In addition to the headers that can be defined for a non-OSGi JAR or WAR file, the bundle manifest file for an OSGi bundle contains OSGi-specific headers. The metadata specified in these headers enables the OSGi Framework to process the modular aspects of the bundle.- Example: OSGi composite bundle manifest file
A composite bundle groups shared bundles together into aggregates. A composite bundle is described in a composite bundle manifest file, META-INF/COMPOSITEBUNDLE.MF. This manifest file lists the OSGi bundles that are directly contained in the composite bundle, and the reference bundles that are hosted alongside the composite bundle in the same EBA file, or in the same bundle repository.- Example: OSGi application manifest file
The OSGi bundles in an enterprise bundle archive (EBA) file share services with other OSGi applications by declaring them in an application manifest file, META-INF/APPLICATION.MF. Any external services and references that the OSGi application produces are exposed by declaring them in the manifest, and any external services and references that the application consumes are also declared in the manifest.- OSGi deployment manifest file
A deployment manifest file, META-INF/DEPLOYMENT.MF, is created automatically when we import an EBA asset. The deployment manifest file lists, at specific versions, all the bundles and composite bundles that make up the application, including bundles that are determined following dependency analysis. The manifest file is used to ensure that each time an application server starts, the bundles that make up the application are the same.
Related:
Enterprise bundle archives Composite bundles Developing an OSGi application
File name: was333.html
prettyPrint();