You create and configure an OSGi Liberty feature project.
Before you begin
Before you create an OSGi feature, you must create an OSGi
bundle.
Procedure
- In the menu, click , and
then click Next.
- In the wizard, specify the name of your project and click Next. For example: service.AgeServiceFeature.
- Select the OSGi bundle that will contain your OSGi feature. For example, select service.AgeService 1.0.0.
- Click Finish.
- Edit the SUBSYSTEM.MF file:
- Remove .qualifier from the Subsystem-Version parameter.
- Add the version number of your service to the IBM-ShortName and Subsystem-SymbolicName parameters. For example:
IBM-ShortName: service.AgeServiceFeature_1.0.0
Subsystem-SymbolicName: service.AgeServiceFeature_1.0.0;visibility:=public
- Add the package of your service. For example: IBM-API-Package:
service.ageservice;version="2.0.0". The package
enables the service to be used by other applications, features, and
the Liberty kernel. The package must match the Export-Package of
your service.
- Save the changes.
Results
The OSGi feature is ready to be built and deployed.