Adam Bien's Weblog
Deploying from command line with WildFly
wildfly comes with a Command Line Interface (CLI) with access to administrative tasks.
The CLI is also usable in "non-interactive" mode from scripts. The following command deploys an application:
$WILDFLY_HOME/bin/jboss-cli.sh --connect --command="deploy --force [PATH_TO_WAR]"
Undeploying an application works adequately:
$WILDFLY_HOME/bin/jboss-cli.sh --connect --command="undeploy x-ray.war"
WildFly'S CLI, similarly to GlassFish'S, is only thin wrapper over a HTTP interface. You could also interact with the server directly over HTTP.
Also the CLI returns proper exit codes and gives you so feedback about the command. Exit codes are a significant benefit over copying a file to a deployment directory.
3 seats left: HTML 5 for Java Developers, Tuesday, April 28th, 2015 and NEW online workshop: Java EE 7 Bootstrap