Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Maven process does not exit gracefully when terminated by Eclipse

This is not specific to m2e, so I suggest bringing this up to Platform
developers and see if they can suggest anything.

--
Regards,
Igor

On 2013-03-06 12:26 PM, David Geiger wrote:
Hi,

I use m2e 1.2.0. with Eclipse 4.2.1 on a Windows 8 x64 machine to
package applications for Google AppEngine and deploy them on the local
development server using the appengine-maven-plugin.

Whenever I click on the red terminate button in the Eclipse console
view, the Maven process launched by m2e does not seem to terminate
correctly. As opposed to launching Maven from the command prompt, it
neither displays the "BUILD SUCCESS" message, nor does it terminate any
child processes such as the Jetty server launched by
appengine-maven-plugin. I need to terminate these left-over processes
manually every time I stop a Maven application from within Eclipse.

Is there another way to terminate Maven applications using m2e?

The issue seems to be related to the behavior of the terminate button in
Eclipse. Apparently, this button calls java.lang.Process.destroy(),
which, on Windows, is implemented as a simple kill and does not allow
applications to exit gracefully.

See:
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016
-
http://jira.codehaus.org/browse/JETTY-208?focusedCommentId=115134&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-115134

If this is a general Eclipse issue, there might be a couple of workarounds:
- There appears to be an interface ITerminate that could be implemented
(see first link, comment 31).
- Maybe the actual Maven process could be launched by another process
that is regularly checked for termination.
- An additional Eclipse button could be implemented, which correctly
terminates the Maven process.

David


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users



Back to the top