gwt-maven-plugin 2.5.0-rc2: mvn gwt:run-codeserver. Stopping / Restarting CoderServer ?

571 views
Skip to first unread message

Oliver

unread,
Oct 8, 2012, 9:55:27 AM10/8/12
to codehaus-mojo-gwt-...@googlegroups.com
Hi!

After reading some guides on SuperDeathMode ( by Broyer, Kurka and Gwt Documentation ) and consulting the FAQ I could not find the answer.

How does one stop / restart the CodeServer using the goal gwt:run-coderserver ?

Ultimativaly I am trying to feed the CodeServer Gwt-Modules ,that were created after the CodeServer was started.

Best regards, Oliver

Thomas Broyer

unread,
Oct 8, 2012, 10:28:56 AM10/8/12
to codehaus-mojo-gwt-...@googlegroups.com


On Monday, October 8, 2012 3:55:27 PM UTC+2, Oliver wrote:
Hi!

After reading some guides on SuperDeathMode ( by Broyer, Kurka and Gwt Documentation ) and consulting the FAQ I could not find the answer.

How does one stop / restart the CodeServer using the goal gwt:run-coderserver ?

Ctrl+C on your console, or killing the process.
(to be honest, I don't use gwt:run or gwt;run-codeserver, I launch them from within Eclipse)

Oliver

unread,
Oct 8, 2012, 11:19:54 AM10/8/12
to codehaus-mojo-gwt-...@googlegroups.com
Ctrl+C'ing does not work if you launched the goal as Maven build command in Eclipse. Also using Eclipse Run configurations violates maven policy of "central configuration".
I really like the run-codeserver goal, and if we are the only ones in need of this functionality I would patch this myself . Any hints and tips are most welcome though ;)
Generally I see two ways of dealing with this:
1. implicitly : Have the SuperDevModeMojo kill the CoderServer if the port is used
2. explicitly : Introduce "stop" and "restart" flags

Any thoughts?

Thomas Broyer

unread,
Oct 8, 2012, 12:47:03 PM10/8/12
to codehaus-mojo-gwt-...@googlegroups.com


On Monday, October 8, 2012 5:19:54 PM UTC+2, Oliver Krylow wrote:
Ctrl+C'ing does not work if you launched the goal as Maven build command in Eclipse.

Can't you stop the "build" from the Maven console view? Or would it only kill Maven and let the SuperDevMode running in the background "detached" from its parent process?
(I tried gwt:run-codeserver back in July when I added support for it and I don't recall having had problems with stopping it)

I'm unfortunately not doing much GWT dev at the moment (our "big" GWT project at work entered maintenance mode); so any suggestion is welcome.
 
Also using Eclipse Run configurations violates maven policy of "central configuration".

The main reasons I don't use gwt:run is because it's much easier to debug the code when launched from Eclipse. And as for gwt:run-codeserver, it doesn't work well with multi-module builds (just like gwt:run; see https://jira.codehaus.org/browse/MGWT-332)

Oliver Krylow

unread,
Oct 10, 2012, 9:22:58 AM10/10/12
to codehaus-mojo-gwt-...@googlegroups.com
Wow, this issue runs deeper than expected :)
Thanks for pointing me to the issue. I wasn't aware of this. We will probably resort to Eclipse Run Command as well in the near future.

I can only guess but I believe the solution in general would be to customize the maven lifecycle phases ( similiar?  ) and add "gwt" and "gwt-lib" as packaging types.

By the way, on Windows 7 + maven + eclipse stopping the "build" from console view behaves as you expected, it is "detached", the server keeps running in
the background

Thomas Broyer

unread,
Oct 10, 2012, 11:22:12 AM10/10/12
to codehaus-mojo-gwt-...@googlegroups.com


On Wednesday, October 10, 2012 3:22:58 PM UTC+2, Oliver Krylow wrote:
Wow, this issue runs deeper than expected :)
Thanks for pointing me to the issue. I wasn't aware of this. We will probably resort to Eclipse Run Command as well in the near future.

I can only guess but I believe the solution in general would be to customize the maven lifecycle phases ( similiar?  ) and add "gwt" and "gwt-lib" as packaging types.

In the long run, that's exactly what I'd like to do (create new packaging types); I don't think it'd solve the issue though (it however doesn't mean it's that hard to solve either; I just didn't took the time to do it, given how much better launching from Eclipse is compared to gwt:run for attaching a Java debugger; SuperDevMode is different though)

Drew Spencer

unread,
Jul 21, 2014, 10:02:32 AM7/21/14
to codehaus-mojo-gwt-...@googlegroups.com, okr...@gmail.com
By the way, on Windows 7 + maven + eclipse stopping the "build" from console view behaves as you expected, it is "detached", the server keeps running in 
the background

I am experiencing this currently. Have posted a question here: http://stackoverflow.com/questions/24866301/maven-gwt-plugin-error-address-already-in-use-bind

Has nothing been done or is there no workaround? I can end the java process, it's no big deal but I would prefer not to.

:)

Stefan Falk

unread,
Jun 28, 2016, 6:11:13 PM6/28/16
to Codehaus Mojo gwt-maven-plugin Users, okr...@gmail.com
I found that killing the code server will leave you with large files eating up your temporary directory (see attachment) ..
Capture.PNG

Thomas Broyer

unread,
Jun 29, 2016, 5:30:42 AM6/29/16
to Codehaus Mojo gwt-maven-plugin Users, okr...@gmail.com
It depends how you kill the process. When allowed to terminate gracefully (SIGINT or SIGTERM), then those temporary files should be cleaned up.
Eclipse for instance sends a SIGKILL so the JVM (and/or the application) cannot do any cleanup before exiting: https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016
FWIW, IntelliJ IDEA gives you the choice: https://www.jetbrains.com/help/idea/2016.1/run-tool-window.html (exit vs. stop)
Reply all
Reply to author
Forward
0 new messages