featureManager command
You can use the featureManager command to find, install, uninstall, or obtain details about features.
The feature that you want to install must be packaged as a subsystem archive (ESA file).
You can access the Liberty Repository using the featureManager command
through a proxy server. For more information, see
Configuring proxy server support for the featureManager command in Liberty.
![[8.5.5.6 or later]](../ng_v8556.gif)
Syntax
The command syntax is as follows:
featureManager action [options]
- install
- Install a feature from an enterprise subsystem archive (ESA)
file, a URL to an ESA file, a feature short name, or a feature symbolic
name.
If you specify a feature short name or a symbolic name, the feature is downloaded from an online repository hosted by IBM.
The install action uses the OSGI-INF/SUBSYSTEM.MF file from the ESA file as a new feature manifest that can be copied into the ${wlp.user.dir}/extensions/lib/features directory (or product extension directory if a value is specified for the --to property) being renamed after the symbolic name of the subsystem. All of the bundles for the subsystem will be extracted into the ${wlp.user.dir}/extensions/lib directory and renamed as {bundle symbolic name}_{bundle version}.jar. License files, checksum files, localization files and other subsystem content will also be extracted to the location defined in the subsystem manifest.
The featureManager command can download assets from the Liberty Repository; for more information, see Installing Liberty Repository assets.
uninstall
- Uninstall features using either the feature short name or the feature symbolic name.Note:
- Ensure that all server processes are stopped before you uninstall a feature.
- The uninstall command cannot uninstall user features; for example: webCacheMonitor-1.0.
- featureList
- Generate an XML file that contains a report that details all the features that are installed.
find
- Find assets in the Liberty Repository that are applicable to your configuration.
classpath
- Generate a JAR file that can be added to a compiler classpath in order to use APIs from a list
of features. This action enables you to compile build scripts against the API JARs that are included
in the product without referencing specific JAR names, which can change when a fixpack is applied.
The output JAR contains relative paths to the API JARs in the product. Therefore, you must not move
the output JAR to another directory. Note: The --features option must be specified with this action.
- help
- Display help information for a specified action.
Options
- --acceptLicense
- Automatically indicate acceptance of license terms and conditions.
--downloadOnly=[all | required* | none]
- Download the requested feature to a local directory without installing
the feature. This option can be configured to download all the dependent
features, the dependent features required for this runtime, or none
of the dependent features. The default is to download the required
dependent features. Specify the directory with the --location option.Note: You cannot use this option if you specify the subsystem archive location with a file name or URL.
--location=directoryPath
- Specifies the location of the subsystem archive that you want
to install. When used with the --downloadOnly option,
this option specifies a destination directory for downloaded features.
This option is required when using the --downloadOnly and --offlineOnly options.Note: You cannot use this option if you specify the subsystem archive location with a file name or URL.
--offlineOnly
- Use this option if you do not want to connect to the Liberty Repository. Instead, the command
only installs features from the local directory. The local directory is specified with the
--location option.Note: You cannot use this option if you specify the subsystem archive location with a file name or URL.
- --to=install_option
- where install_option can take one of the following
values:
- usr: The feature is installed as a user feature. This is the default value.
- extension: The location to which you want to install the feature. You can install the feature to any configured product extension location.
- --viewLicenseAgreement
- View license agreement.
- --viewLicenseInfo
- View license information.
- --when-file-exists=exist_option
- Specifies the action to take if a file to be installed already
exists. exist_option can take one of the following
values:
- fail: Cancel the installation.
- ignore: Continue the installation and ignore the file that exists.
- replace: Overwrite the existing file.
- --verbose
- Use this option to display any available additional information while the action runs.
- subsystem_archive
- Specifies the location of the subsystem archive that you want to install. You can specify the
location in the following ways:
- A file name; for example: my_feature.esa.
- A URL, for example:
http://myhost.ibm.com/liberty/assets/my_feature.esa
The short name of the subsystem archive (ESA file), such as adminCenter-1.0
The symbolic name of the subsystem archive (ESA file), such as com.ibm.websphere.appserver.adminCenter-1.0
For more information, see the Downloads page on WASdev.net.
Note: Specify multiple features by separating the features with a comma or a space. For versions prior to Version 8.5.5.7, multiple features must be separated by a comma.
![[8.5.5.5 or later]](../ng_v8555.gif)
--force
Uninstall the specified feature regardless of whether other installed features have dependencies on it.
Note: Uninstalling a feature that is required by other installed features might cause those features to stop working and might prevent servers from running correctly.- --noPrompts
- Uninstall features without any user interaction or confirmation messages.
- --verbose
- Use this option to display any available additional information while the action runs.
- name
- Specify the feature to uninstall. You can specify the following options:
- The short name of the subsystem archive (ESA file), such as adminCenter-1.0.
- The symbolic name of the subsystem archive (ESA file), such as com.ibm.websphere.appserver.adminCenter-1.0.
- --encoding=charset
- where charset is the character set to use when creating the XML report file.
- --locale=language
- where language specifies the language to use when creating the XML report file. This consists of the ISO-639 two-letter lowercase language code, optionally followed by an underscore and the ISO-3166 uppercase two-letter country code.
- --productExtension=name
- where name is the product extension name whose features are to be listed. If the product extension is installed in the default user location, use the keyword: usr. If this option is not specified, the action is taken on WebSphere Application Server Liberty Core.
- XML_report_file_name
- Specifies the name of the XML report file that you want to create.
--viewInfo
- View detailed information.
- --verbose
- Use this option to display any available additional information while the action runs.
searchString
- Use the searchstring option to find applicable features from the IBM WebSphere Liberty Repository
![[8.5.5.4 or later]](../ng_v8554.gif)
- --features=feature1,feature2,...
- The list of features that contain the list of API JAR files. This option is required for the classpath action.
- fileName
- The name of the generated JAR file.
Usage examples
featureManager install my_feature.esa --to=usr
featureManager install my_feature.esa --to=my_extension
featureManager featureList my_feature_report.xml --locale=pt_BR
featureManager featureList --productExtension=usr my_feature_report.xml
featureManager featureList --productExtension=productExtensionName my_feature_report.xml
featureManager help install

![[8.5.5.4 or later]](../ng_v8554.gif)
featureManager find searchString

![[8.5.5.4 or later]](../ng_v8554.gif)
featureManager find searchString --viewInfo

![[8.5.5.4 or later]](../ng_v8554.gif)
featureManager install feature_shortName --downloadOnly --location=c:\temp\download --acceptLicense

![[8.5.5.4 or later]](../ng_v8554.gif)
featureManager install feature_shortName --downloadOnly=all --location=c:\temp\download --acceptLicense

![[8.5.5.4 or later]](../ng_v8554.gif)
featureManager install feature_shortName --location=c:\temp\download --acceptLicense

![[8.5.5.4 or later]](../ng_v8554.gif)
featureManager install feature_shortName --location=c:\temp\download --offlineOnly

![[8.5.5.4 or later]](../ng_v8554.gif)
featureManager classpath --features=servlet-3.0 classpath.jar
javac -cp classpath.jar TestServlet.java

![[8.5.5.5 or later]](../ng_v8555.gif)
featureManager uninstall adminCenter-1.0
![[Updated in May 2014]](../delta.gif)
Return codes
Return code | Explanation |
---|---|
0 | The command successfully completed the requested operation. |
20 | One or more arguments are not valid. |
21 | A runtime exception occurred because of one
or more of the following conditions:
|
22 | The feature that you wanted to install already exists. |
23 | The feature definition was not valid for one
or more of the following reasons:
|
24 | The .esa subsystem archive file is missing content. |
25 | A file that you wanted to install already exists, and you specified the when-file-exists=fail option. |
26 | The product is not a core product, and the product extension files cannot be found. |
27 | The product is not a core product, and the product extension is not defined in the ${wlp.install.dir}/etc/extensions/extension_name.properties file. |
28 | The manifest files for the feature in the product extension cannot be found. |
29 | The feature is not valid for the current product. |
![[Updated in May 2014]](../deltaend.gif)