Closed GoogleCodeExporter closed 9 years ago
I can reproduce this, but it's non-trivial to fix. I've actually been working
on this for a few months when I have some time to spare. I've tried reducing
the probability of it happening, but in some cases, yes, this can happen.
Original comment by matts...@google.com
on 27 Feb 2013 at 7:44
I made a few changes to help with this problem, give 1.7.6 a go and let me know
if it's any better.
Original comment by matts...@google.com
on 21 Mar 2013 at 6:18
Thanks for your efforts! The problem is still present with 1.7.6, though. I
looked into this some more and the issue seems to be that the Eclipse terminate
button uses Java Process.destroy(), which, at least on Windows, immediately
kills any application. Therefore, the Maven process (or appengine-maven)
probably doesn't get to terminate the Jetty child process.
See the discussion of this on the m2e mailing list and the related
Jetty/Eclipse issues:
- http://dev.eclipse.org/mhonarc/lists/m2e-users/msg03862.html
- http://jira.codehaus.org/browse/JETTY-208?focusedCommentId=115134
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=64230
There might be two possible ways to approach this:
a) Wrap appengine-maven in another process, which regularly checks for the
presence of the Maven parent process and, if killed, terminates the Jetty child
process (and itself).
b) Separate the Jetty lifecycle from application deployment. A Jetty instance
could be launched automatically at deployment time only if none is running and
otherwise be reused. Ideally, there would be a way to integrate the development
server into the Eclipse server view (maybe using GPE?) to enable an easy
shutdown.
Running Maven from a console and terminating it using Ctrl+C works fine,
though. Terminating it via a remote debugging connection in Eclipse works, too,
although this is somewhat cumbersome. We now use this external launch
configuration in Eclipse:
Command: C:\Windows\System32\cmd.exe
Location: ${workspace_loc:/myproject}
Arguments: /C "start /WAIT cmd /C mvn appengine:devserver -P debug"
Original comment by geiger....@gmail.com
on 25 Mar 2013 at 10:40
I'm adding a devserver_stop goal that will make sure it isn't running. It
needs to be called with the same address/port you used to create the server.
Original comment by matts...@google.com
on 8 May 2013 at 10:29
Added in 1.8.0, there is also a step when starting the devserver that will kill
another server running on the same port. Reopen if this doesn't solve it!
Original comment by matts...@google.com
on 8 May 2013 at 11:17
Original issue reported on code.google.com by
geiger....@gmail.com
on 22 Feb 2013 at 1:30