JBoss undeploy cli command

JBoss undeploy cli command below for reference,

Connect to the Jboss Console using ./jboss-cli.sh –connect command based on standalone mode or domain mode configuration. Once connected, issue below command to check the commands available and then use undeploy command.

help –commands

JBoss undeploy cli command

Issue, undeploy –help to get overview of the command and its usage.

 

Below is the command that will be used for un-deployment in Jboss CLI mode (i am using Domain mode here). I have already deployed a WAR file (refer to Jboss deploy cli command blog entry) and I am undeploying from main-server-group as part of server-groups.

undeploy <nameofthedeployedwarfile> –server-groups=<groupname>

 

Below are the ARGUMENTS available for the undeploy command from JBoss CLI mode.

name – the name of the deployment to undeploy.

–server-groups – comma separated list of server group names the undeploy command should apply to. Either server-groups or all-relevant-server-groups is required in the domain mode. This argument is not applicable in the standalone mode.

–all-relevant-server-groups – indicates that undeploy should apply to all the server groups in which the deployment is
enabled. Either server-groups or all-relevant-server-groups is required in domain mode. This argument is not applicable
in the standalone mode.

–keep-content – by default undeploy, besides disabling the deployment, also removes its content from the repository. The presence of –keep-content will only disable the deployment w/o removing its content from the repository. This argument can be used in both standalone and domain modes.

-l – in case the deployment name isn’t specified, the presence of the -l switch will make the existing deployments printed one deployment per line, instead of in columns (the default).

–headers – a list of operation headers separated by a semicolon. For the list of supported headers, please, refer to the domain management documentation or use tab-completion.

–path – optional, points to a cli archive. The path can be either absolute or relative to the current directory. A cli archive
is a zip archive containing script(s) as well as artifacts or applications to deploy. To be recognized as a cli
archive, the extension of the archive file should be ‘.cli’. The undeploy command will execute the script given by the
–script argument.

–script – optional, can appear only if the file_path points a cli archive. The value is the name of the script contained in a
cli archive to execute. If not specified, defaults to ‘undeploy.scr’. All paths in the scripts are relative to the root directory in the cli archive. The script is executed as a batch.

 

Please find Jboss Documentation link for deploy CLI command here.