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:
Please, make sure the war archive is getting bundled before deploylocal is executed.
Maybe, you could define a dependency:
task deploylocal(dependsOn: build) << {
NB There is a convention property in java plugin named libsDir. It allows you to reference build/libs directory in better way:
task deploylocal(dependsOn: build) << {
println "Copy from ${libsDir.getPath()} into ${tomcatHome}/webapps"
copy{
from libsDir
into "${tomcatHome}/webapps"
include '*.war'
}
}