Manifests and Bnd Templates for Software AG Common Platform
Before you can create bundles for your project, your project must have a manifest. If a manifest.mf file exists in your project's src/main/resources folder, the manifest file serves as a template during bundle creation. Otherwise, Application Platform automatically creates a manifest when you publish your project. However, in some cases you need to customize the default manifest. You can customize manifests dynamically using a Bnd template. The following examples describe cases when custom manifests are required:
Indirect Package Imports. The default manifest is created with a list of package imports after analyzing the project classes' imports and locating external package dependencies found in the bundle. Because the project is compiled against is also a bundle, the analysis can match package imports to specific bundle versions. Sometimes dependencies are declared in additional metadata, such as XML files and class references, and are invoked indirectly. These additional dependencies must be exported by another bundle in the container and the manifest must be customized, so that the additional packages can be imported.
Reduced Scope of Package Exports. By default, all packages defined in the project bundle are exported. If you want to customize the package exports, you must declare an alternative set of exports. You can do this by customizing the default manifest. For example, you can configure
Application Platform to only export packages that represent a public API, and keep your implementation packages in the bundle.
Related Topics