featureManager command
Use the featureManager command to install a feature and to obtain details of all the features that are installed.
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.
find
, install
, and uninstall
actions are
stabilized except when you install .esa files.
Use the installUtility command instead of the featureManager command. With the installUtility command, you can manage more asset types and install, find, or download assets from multiple repositories. For more information, see Installing assets using the installUtility command.
Syntax
The command syntax is as follows:
featureManager action [options]
- install
-
Stabilized feature: This action is stabilized. Use the installUtility install command unless you install .esa files. Use the featureManager command to install .esa files.
- uninstall
-
Stabilized feature: This action is stabilized. Use the installUtility uninstall command instead.
- featureList
- Generate an XML file that contains a report that details all the features that are installed.
- find
-
Stabilized feature: This action is stabilized. Use the installUtility find command instead.
- 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
- When installing a feature, this option specifies a local source directory from which you can
install features. 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 the license agreement.
- --viewLicenseInfo
- View the 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.
- name
- Specifies one or more features that you want to install, separated by a space or comma. You can
specify the features in the following ways:
- Feature IDs
-
- Specify the short name of the feature, such as
adminCenter-1.0
- Specify the symbolic name of the feature, such as
com.ibm.websphere.appserver.adminCenter-1.0
- Specify the short name of the feature, such as
- .esa file
-
- Specify a file name, such as my_feature.esa
- Specify a URL, such as http://myhost.ibm.com/liberty/assets/my_feature.esa
This action uses the OSGI-INF/SUBSYTEM.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.
- --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 one or more features to uninstall, separating the names by a space or comma. 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
.
- The short name of the subsystem archive (ESA file), such as
- --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.
- --verbose
- Use this option to display any available additional information while the action runs.
- --viewInfo
- Displays detailed information.
- --verbose
- Use this option to display any available additional information while the action runs.
- searchString
- Generates a list of Liberty Repository assets that are applicable to your configuration.
- --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
usr
product extension. The report is written to the file
my_feature_report.xml:featureManager featureList --productExtension=usr my_feature_report.xml
featureManager featureList --productExtension=productExtensionName my_feature_report.xml
featureManager help install
featureManager install extendedPackage-1.0 --verbose
featureManager find searchString
featureManager find searchstring --viewInfo
The following
example finds a feature and includes additional
information:featureManager find "adminCenter-1.0" --verbose
featureManager install feature_shortName --downloadOnly --location=c:\temp\download --acceptLicense
featureManager install feature_shortName --downloadOnly=all --location=c:\temp\download --acceptLicense
featureManager install feature_shortName --location=c:\temp\download --acceptLicense
featureManager install feature_shortName --location=c:\temp\download --offlineOnly
The following example creates a classpath JAR file and compiles an application class that uses it:
featureManager classpath --features=servlet-3.0 classpath.jar
javac -cp classpath.jar TestServlet.java
featureManager uninstall adminCenter-1.0
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. |
36 | Installation of a user feature is invalid for the extension specified: --to=core . |