Run the solutionManager undeploy command
to undeploy a solution.
Before you begin
To undeploy the current active version of a solution while
the server is running, you must run the solutionManager stop command
before you undeploy the solution.
About this task
The solutionManager undeploy command
runs with the local parameter or with the remote parameter. The local
parameter undeploys the solution from the local file system. The remote
parameter uses the HTTPS protocol to connect to the Liberty server
and undeploys the solution from the specified server, which might
be a remote host or the local host. The remote Liberty server must
be started before you run the script.The undeploy command
removes the solution feature references from the server.xml file
on the Liberty server. The command does not delete any of files that
are associated with the solution such as the manifest file and the
feature .jar files. You can look for these files
in the C:\IBM\ODMInsights810x\cis\wlp\usr\extension\lib directory
and delete them when you want to remove the solution from the server
completely. To delete the retained solution files, run the solutionManager delete command.
Do
not undeploy an existing version of a solution when upgrading to a
new version.
Restriction: The solutionManager script
detects solution files that remain on the server after undeployment.
On a production server, you cannot reuse the same solution version
unless you delete these files first.
Procedure
- Run the solutionManager undeploy command
on Windows or Linux® as shown in the following examples. You
must provide administrator authentication credentials to run the command
with the remote parameter.
- Run the script on Windows with
the local parameter or with the remote parameter, and provide extra
parameter values that are relevant to your deployment scenario.
solutionManager undeploy local MySolution-0.0 --server=cisDev
solutionManager undeploy remote MySolution-0.0 --host=localhost --port=9080 --username=user1 --password=user1pw --trustStoreLocation=C:\IBM\ODMInsights810x\runtime\wlp\usr\servers\cisDev\resources\security\key.jks --trustStorePassword=truststore
- Run the script on Linux with
the local parameter or with the remote parameter, and provide extra
parameter values that are relevant to your deployment scenario.
./solutionManager undeploy local MySolution-0.0
./solutionManager undeploy remote MySolution-0.0 --host=localhost --port=9080 --username=user1 --password=user1pw --trustStoreLocation=/opt/ibm/ODMInsights810x/runtime/wlp/usr/servers/cisDev/resources/security/key.jks --trustStorePassword=truststore
- Optional: Solution artifact files such as the
feature manifest file and the feature .jar files
are not deleted from the file system by the undeploy script. If the
solution artifact files are not used by other installed solutions,
you can delete these files by running the solutionManager delete command.
When the files are
removed, you can reuse the same solution version.