A Liberty feature includes OSGi bundles that contain classes
and services. The classes and services implement the functions that
the Liberty feature provides. You 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.
Procedure
To add OSGi bundles to a Liberty feature project, complete
the following steps:
- 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 (
).
- 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 Creating OSGi bundle projects.
- (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.
- (Optional) Use the Location field
in the Properties dialog box to specify the location
where you want the bundle to be packaged when exported, relative to
the product extension installation folder. If you want 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.