Do we need to raise an issue for this? On 24/04/2012, at 7:57 PM, rnavarette wrote:
> Hi Everyone, > > Looking at a change made to AbstractJettyRunTask > (https://github.com/gradle/gradle/commit/5ed4fa1f4cad251424c2cb64917097f0e3dad51a) > by Adam Murdoch, it looks like the problem is in startJettyInternal(). The > following was added, right before the stop monitor is created/started: > > if(daemon) { > return; > } > > So, whenever running in daemon mode, we don't create a stop monitor, and so > we can't stop a running server using the jettyStop task. Does anyone know > of a reason for this, or is it a bug? > > Background: > > I'm having a problem stopping a jetty server that is running as a daemon. > The server is started using jettyRunWar before running tests and then is > supposed to be stopped afterward. The tasks are running properly and in the > proper order. > > As far as I can tell, the jettyRunWar task is not paying attention to the > stopPort as configured in the gradle script. If I monitor the build by > pausing before and after the jettyRunWar task, I can use netstat and see > that there is no listening port using the number i set for stopPort. So, > when jettyStop runs, it doesn't do anything because there is no monitor > listening on the expected port. > > I think that most users wouldn't notice this issue because the server is > properly stopped when the gradle script finishes execution. In our case > though, we start and stop multiple jetty servers in the course of a build to > run different sets of acceptance tests. Whenever the second set of tests > starts (in whatever order we run them) they fail because the webapp is not > deployed properly to the server due to the previous server not shutting > down. > > Thanks, > ray > > -- > View this message in context: > http://gradle.1045684.n5.nabble.com/Stopping-Jetty-tp5662999p5662999.html > Sent from the gradle-dev mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > -- Luke Daley Principal Engineer, Gradleware http://gradleware.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
