Java Reference
In-Depth Information
Deploying applications using the CLI
Deploying an application (in the standalone mode) can be easily performed by copying the
application's archives into the deployment folder of your server distribution. That's a
pretty handy option; however, we would like to stress the advantage of using a CLI, which
offers a wide choice of additional options when deploying and also provides the opportun-
ity to deploy applications remotely.
All it takes to deploy an application's archive is a connection to the management instance,
either local or remote, and by issuing of the deploy shell command. When used without
arguments, the deploy command provides a list of applications that are currently de-
ployed, as shown in the following command:
[disconnected /] connect
[standalone@localhost:9990 /] deploy ExampleApp.war
If you feed a resource archive such as a WAR file to the shell, it will deploy it on the stan-
dalone server right away, as shown in the following command:
[standalone@localhost:9990 /] deploy ../MyApp.war
By default, a CLI uses the JBOSS_HOME/bin file as a source for your deployment
archives. You can, however, use absolute paths when specifying the location of your
archives; the CLI expansion facility (using the Tab key) makes this option fairly simple:
[standalone@localhost:9990 /] deploy c:\deployments\MyApp.war
Redeploying the application requires an additional flag to be added to the deploy com-
mand. Use the -f argument to force the application's redeployment:
[standalone@localhost:9990 /] deploy -f ../MyApp.war
Undeploying the application can be done through the undeploy command, which takes
the application that is deployed as an argument. This is shown in the following command:
[standalone@localhost:9990 /] undeploy MyApp.war
Search WWH ::

Custom Search