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.
NEW workshop: Building HTML 5 Applications Without Frameworks, Full week in December 2016: from Java EE 7 Bootstrap, Effective, Architectures over Testing to Microservices
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.