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.
Classic Java EE 7 Workshops: Bootstrap, Effective and Architectures, July, 13th-15th
Online workshop: Java EE 7 Bootstrap