pluginUtility command
If the Liberty server generates the plug-in configuration file automatically, you can use the pluginUtility command to collect the plug-in configuration files and merge them. Additionally, you can use the pluginUtility command to manually generate the plug-in configuration file.
Syntax
The command syntax is as follows:
pluginUtility action [options]
- help
- Display help information for a specified action.
You can display help for the pluginUtility command, or help for specific actions such as the merge action.
- merge
- Merge multiple web server plug-in configuration files into a single file.
- generate
- Create the plug-in configuration file by using this utility.
Options
- --server=serverid for a local server or --server=user:password@host:port for a remote server
- Applies only to the generate action, and is required when you code the generate action on the
pluginUtility command.
- For a local server, the server option is the server name.
- For a remote server, the server option is user:password@host:port
- The server must be running, whether for a local server or a remote server.
- user
- An administrator for the target server. The utility prompts you for a value if you do not provide one. Do not use a colon (:) as part of user.
- password
- The password for the administrator user for the target server. The utility prompts you twice for a value if you do not provide one. Your password entries must match.
Important: You specify user and password on this option so that when you specify these values on the command line, they work. The target server checks the values that you specify for user and password against the values that you specify on the command line.Tip: For a remote request, you can code the user ID and password in the server.xml file of the target server.Example:<quickStartSecurity userName="AdminUser" userPassword="AdminPassword" />
- host
- The host for the target server. Do not use the @ symbol in the host value. A missing host value results in a failure.
- port
- The port number for the target server. A missing port value results in a failure.
Attention: When the server specified is a remote server, the user is asked to accept an SSL certificate for the request to be completed. To automatically accept SSL certificates, set the JVM property of com.ibm.webserver.plugin.utility.autoAcceptCertificates to true.
- --cluster=cluster_name
- Applies only to the generate action, and is required when you generate a plug-in configuration
file for a cluster server by using this utility. Specify the name of the server cluster.
When you specify the --cluster option, you must specify the collective controller on the --server option.
For a server in the cluster to be included in the plug-in configuration file, it must be running and joined to the collective controller.
- --sourcePath=directory|comma-separated list
- Required option that applies only to the merge action. Specify the location of the source directory that has all the plug-in configuration files. Or, to identify plug-in files to merge, specify a comma-separated list of source plug-in file names with the full file path.
- --targetPath=directory|full path name
- Optional option that applies to the merge action and
the generate action.
For the generate action, by default, the plug-in configuration file is generated in the current directory with the name cluster_name-plugin-cfg.xml for a cluster request, and plugin-cfg.xml for a non-cluster request. You can either specify the directory name where the file must be placed, or specify a fully qualified file name. The directory must exist. The new file replaces an existing file.
For the merge action, by default, the merged plug-in configuration file is generated in the current directory and named merged-plugin-cfg.xml. You can either specify the target directory name for the merged-plugin-cfg.xml file or a fully qualified file name. The directory must exist. If a file named merged-plugin-cfg.xml or the specified file name exists, then the contents of the file is overwritten.
Usage
The following examples demonstrate correct syntax:
pluginUtility help
pluginUtility help merge
pluginUtility merge --sourcePath=C:/plugins
pluginUtility merge --sourcePath=C:/plugins/plugin-cfg.xml,C:/plugins/Aplugin-cfg.xml,C:/other/plugin-cfg.xml
pluginUtility merge --sourcePath=C:/plugins --targetPath=C:/targetDir
pluginUtility merge --sourcePath=C:/plugins --targetPath=C:/targetDir/myMergedPluginCfg.xml
pluginUtility help generate
pluginUtility generate --server=myController --cluster=myCluster --targetpath=./pluginFile/plugin-cfg.xml
pluginUtility generate --server=userName:mypassword@myControllerHost:9443 --cluster=myCluster --targetpath=./pluginFiles/plugin-cfg.xml
pluginUtility generate --server=myServer --targetpath=./pluginFiles/plugin-cfg.xml
pluginUtility generate --server=userName:mypassword@testHost:9443 --targetpath=./pluginFiles/plugin-cfg.xml
pluginUtility generate --server=userName:@testHost:9443
pluginUtility generate --server=userName:@testHost:9443
command, the user is prompted for the password.--sourcePath
option
is C:\Program Files\myFiles\plugin-cfg.xml, specify
--sourcePath="C:/Program Files/myFiles/plugin-cfg.xml"
in the command.