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 runtime environments and
enable installed features using the server configuration editor. Changes to features already
installed on Liberty can be pushed to all
respective runtime environments using the Update Feature menu option in the
workbench.
Procedure
To install a Liberty feature to
Liberty, 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
runtime environment that you want to install your feature. Click
Finish.
Tip: If the feature is already installed on Liberty, the Liberty entry is no longer an available option in
the list of target runtimes. Instead, 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 Liberty.
- Add the feature name to the list of configured features
in your server configuration (server.xml file):
-
In the Servers view, expand your Liberty
server, 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 Liberty, 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 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.