Have you looked at just using the gradle-tomcat-plugin ( https://github.com/bmuschko/gradle-tomcat-plugin)? If that doesn't suit your needs for some reason, maybe you can examine it's source to see how it deals with the problem.
Jamie On Fri, Mar 18, 2011 at 5:33 PM, Neil Chaudhuri < [email protected]> wrote: > 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. > -- Jamie Bisotti
