+

Search Tips   |   Advanced Search

Add OSGi bundles to a Liberty feature project

A Liberty feature includes OSGi bundles containing classes and services. The classes and services implement the functions that the Liberty feature provides. We can include OSGi bundles in a Liberty feature that was created with the WebSphere Application Server Developer Tools by adding the bundles to the corresponding Liberty feature project.

To add OSGi bundles to a Liberty feature project:

  1. From the Project Explorer view, open the feature manifest file for the Liberty feature project by double-clicking the Manifest node in the project hierarchy, indicated by the manifest icon (.

  2. In the Contained Bundles pane, click Add to select one or more bundles to add to the Liberty feature project, or click New to create a new OSGi bundle to add to the Liberty feature project. For information on creating an OSGi bundle, see Create OSGi bundle projects.

  3. Optional. Specify the version range for the contained bundle by selecting the bundle, clicking Properties, and entering the required values in the Minimum Version and Maximum Version fields.

  4. Optional. Use the Location field in the Properties dialog box to specify the location where we want the bundle to be packaged when exported, relative to the product extension installation folder. The bundle to be packaged in more than one location, enter the locations as a comma-separated list. By default, the bundle is packaged in the /lib folder.


Results

The bundle names are added to the Subsystem-Content header in the manifest file. For more information on the headers in the feature manifest file for a Liberty feature, see Liberty feature manifest files.


Parent topic: Create a Liberty feature using developer tools

Tasks:

  • Create a Liberty feature project
    Specify API and SPI packages for a Liberty feature project
    Install a Liberty feature to the Liberty profile V8.5.5
    Manually installing a Liberty feature to the Liberty profile V8.5 or earlier