{"id":1096,"date":"2017-07-28T21:56:31","date_gmt":"2017-07-28T16:26:31","guid":{"rendered":"http:\/\/www.middlewareprimer.com\/blog\/?p=1096"},"modified":"2017-07-28T21:56:31","modified_gmt":"2017-07-28T16:26:31","slug":"jboss-undeploy-cli-command","status":"publish","type":"post","link":"http:\/\/www.middlewareprimer.com\/blog\/2017\/07\/28\/jboss-undeploy-cli-command\/","title":{"rendered":"JBoss undeploy cli command"},"content":{"rendered":"<p>JBoss undeploy cli command below for reference,<\/p>\n<p>Connect to the Jboss Console using .\/jboss-cli.sh &#8211;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.<\/p>\n<p>help &#8211;commands<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1089 size-full\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy1.png\" alt=\"JBoss undeploy cli command\" width=\"1402\" height=\"130\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy1.png 1402w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy1-300x28.png 300w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy1-768x71.png 768w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy1-1024x95.png 1024w\" sizes=\"auto, (max-width: 1402px) 100vw, 1402px\" \/><\/strong><\/p>\n<p>Issue, undeploy &#8211;help to get overview of the command and its usage.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1093\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy4.png\" alt=\"\" width=\"645\" height=\"213\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy4.png 645w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy4-300x99.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>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 <a href=\"http:\/\/www.middlewareprimer.com\/blog\/2017\/07\/28\/jboss-deploy-cli-command\/\"><span style=\"text-decoration: underline;\"><strong>Jboss deploy cli command blog entry<\/strong><\/span><\/a>) and I am undeploying from main-server-group as part of server-groups.<\/p>\n<p><strong>undeploy &lt;nameofthedeployedwarfile&gt; &#8211;server-groups=&lt;groupname&gt;<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1094\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy5.png\" alt=\"\" width=\"759\" height=\"46\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy5.png 759w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2017\/07\/jbossdeploy5-300x18.png 300w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Below are the ARGUMENTS available for the undeploy command from JBoss CLI mode.<\/p>\n<p><strong>name &#8211;<\/strong> the name of the deployment to undeploy.<\/p>\n<p><strong>&#8211;server-groups &#8211;<\/strong> 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.<\/p>\n<p><strong>&#8211;all-relevant-server-groups &#8211;<\/strong> indicates that undeploy should apply to all the server groups in which the deployment is<br \/>\nenabled. Either server-groups or all-relevant-server-groups is required in domain mode. This argument is not applicable<br \/>\nin the standalone mode.<\/p>\n<p><strong>&#8211;keep-content &#8211;<\/strong> by default undeploy, besides disabling the deployment, also removes its content from the repository. The presence of &#8211;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.<\/p>\n<p><strong>-l &#8211;<\/strong> in case the deployment name isn&#8217;t specified, the presence of the -l switch will make the existing deployments printed one deployment per line, instead of in columns (the default).<\/p>\n<p><strong>&#8211;headers &#8211;<\/strong> 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.<\/p>\n<p><strong>&#8211;path &#8211;<\/strong> optional, points to a cli archive. The path can be either absolute or relative to the current directory. A cli archive<br \/>\nis a zip archive containing script(s) as well as artifacts or applications to deploy. To be recognized as a cli<br \/>\narchive, the extension of the archive file should be &#8216;.cli&#8217;. The undeploy command will execute the script given by the<br \/>\n&#8211;script argument.<\/p>\n<p><strong>&#8211;script &#8211;<\/strong> optional, can appear only if the file_path points a cli archive. The value is the name of the script contained in a<br \/>\ncli archive to execute. If not specified, defaults to &#8216;undeploy.scr&#8217;. All paths in the scripts are relative to the root directory in the cli archive. The script is executed as a batch.<\/p>\n<p>&nbsp;<\/p>\n<p>Please find Jboss Documentation link for deploy CLI command <span style=\"text-decoration: underline;\"><a href=\"https:\/\/docs.jboss.org\/author\/display\/WFLY8\/Application+deployment\" target=\"_blank\" rel=\"noopener\"><strong>here<\/strong><\/a><\/span>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JBoss undeploy cli command below for reference, Connect to the Jboss Console using .\/jboss-cli.sh &#8211;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 &#8211;commands Issue, undeploy &#8211;help to get overview of the command and its usage. &nbsp; Below [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[290],"tags":[338,232,334,340,339,341,292,342],"class_list":["post-1096","post","type-post","status-publish","format-standard","hentry","category-jboss","tag-cli","tag-deployment","tag-jboss","tag-jboss-undeploy","tag-undeploy","tag-undeploy-command","tag-wildfly","tag-wildfly-undeploy-cli"],"_links":{"self":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/1096","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/comments?post=1096"}],"version-history":[{"count":3,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/1096\/revisions"}],"predecessor-version":[{"id":1100,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/1096\/revisions\/1100"}],"wp:attachment":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/media?parent=1096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/categories?post=1096"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/tags?post=1096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}