I\'m trying to write a Gradle task which copies generated war files to my local tomcat instance:
This isn\'t working and I\'m not sure how to debug it:
The WAR task is aware of the artifacts it generates.
task deployToTomcat(type: Copy) {
from war.archivePath
into "${tomcatHome}/webapps"
}
I accomplished this with:
task deploy (dependsOn: war){
copy {
from "build/libs"
into "C:/dev/jetty-distribution-9.1.4.v20140401/webapps"
include "*.war"
}
}
running it like this:
gradle deploy
Alternatively, you might be able to leverage the gradle-tomcat-plugin