When you develop a Liberty feature by using the WebSphere® Application Server
Developer Tools, you need to create a Liberty feature project that
packages the Liberty feature. You can use the workbench to install
Liberty features to Liberty profile runtime environments and enable
installed features using the server configuration editor. Changes
to features already installed on Liberty profiles can be pushed to
all respective runtime environments using the Update Feature menu
option in the workbench.
Procedure
To install a Liberty feature to the Liberty profile,
complete the following steps:
- In the Enterprise Explorer view,
right-click your Liberty feature project and select .
- In the Feature install wizard and
under Target Runtimes, select the Liberty profile
runtime environment that you want to install your feature. Click Finish.
Tip: If the feature is already installed on a Liberty
profile, the Liberty profile entry is no longer an available option
in the list of target runtimes. Instead, you should use the Update
Features menu option (available when you right-click the
Liberty feature project in the Enterprise Explorer view) to update
any changes to a feature already installed on a Liberty profile.
- Add the feature name to the list of configured features
in your server configuration (server.xml file):
- In the Servers view, expand your Liberty profile, right-click
the Server Configuration [server.xml] and select Open.
- In the Server Configuration editor, under the Configuration
Structure, expand Server Configuration and
select Feature Manager.
- Under the Feature Manager, select
the Add button.
- In the Add Features wizard, search
and select your feature with the prefix usr: followed
by the name of your Liberty feature project, for example, usr:MyLibertyFeatureProject.
Click OK.
In the Source tab of the Server
Configuration editor, the server.xml file displays
the newly added feature entry under the featureManager node:<featureManager>
<feature>usr:MyLibertyFeatureProject</feature>
</featureManager>
Results
After installing the Liberty feature in the Liberty profile,
you can find the following file structure in the
${wlp.user.dir}/extension directory:
/lib
/features
manifest files
.
.
.
OSGi bundle JAR files
.
.
.
What to do next
To update changes to a feature already installed on the Liberty
profile runtime environments, use the
Update Features menu
option (available when you right-click the Liberty feature project
in the Enterprise Explorer view). A
Progress Information window
opens and the workbench takes a moment to perform this update action.