apply plugin: 'java' apply plugin: 'war' sourceCompatibility = 1.8 version = '1.0' repositories { mavenCentral() mavenLocal() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' compile 'org.apache.commons:commons-compress:1.9' compile 'org.tukaani:xz:1.5' compile 'javax:javaee-api:7.0' compile 'commons-io:commons-io:2.4' testCompile 'com.thoughtworks.xstream:xstream:1.4.8' } task deployWildfly(dependsOn: 'war') << { '/opt/wildfly/bin/jboss-cli.sh --connect --user=admin --password=qwerty --command="deploy build/libs/jpacrepo-1.0.war --force"'.execute().waitFor() }