On Jan 28, 2009, at 7:48 PM, james_bromley wrote:


If anyone's interested i just added this to my build file:


task('jettyStop').doLast {
 println 'sleeping'
 sleep(5000)
}




james_bromley wrote:

I'm running gradle in IntelliJ using the external tools method and am
using the jetty plugin which is running fine.

However, when i stop the external tool running in IntelliJ, it doesn't
seem to stop the java process, which i therefore have to kill in the
windows task manager (any ideas how to fix that would be appreciated too).

So i started using jettyStop task which, after some fooling about with,
now works fine too
( for some reason i have to specify all of the following to get it to
work:

jettyRunWar.stopPort = 8081
jettyRunWar.stopKey = 'stopKey'

jettyStop.stopPort = 8081
jettyStop.stopKey = 'stopKey'

Any ideas why

stopPort = 8081
stopKey = 'stopKey'

isn't enough?)

The Jetty plugin is a pretty straight forward port of the Maven Jetty plugin. We definitely need to improve it. Just as a side note. You could do:

[jettyRunWar, jettyStop]*.stopPort = 8081

The Jetty plugin is in dire need of Javadoc and user's guide coverage. Sorry for this.



But the final hurdle is that i have set jettyStop to run first before
running my build, so that i don't have to run two tasks, however, even though this stops jetty correctly, it seems to do so asynchronously, so that by the time clean runs it errors because jetty is still using the
build directory.

Thanks for any advice. I have attached my build file.
http://www.nabble.com/file/p21689578/build.gradle build.gradle

Could you file a Jira for this problem?

Thanks

- Hans



James Bromley


--
View this message in context: 
http://www.nabble.com/running-jettyStop-synchronously--tp21689578p21712161.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to