As a recovering Maven user, I am trying to replicate the Jetty plugin in Maven
with something similar using Tomcat and Gradle in order to run some tests. To
that end, I have the following set up:
task deploy(dependsOn: [cleanTomcat, copyWarToTomcat, startTomcat]) << {}
task runServerTests(type: Test, dependsOn: deploy) << {
useTestNG()
includes = ["**/*IT.class"]
doLast {
stopTomcat
}
}
The problem is that Gradle doesn't know when startTomcat is done because the
server just starts and that's it. I am exploring ways to register some sort of
output for the task or to write some sort of listener, but I was curious if
anyone had succeeded at this or had any ideas on a better approach.
Thanks.