Rajafkvp / appengine-maven-plugin

Automatically exported from code.google.com/p/appengine-maven-plugin
Apache License 2.0
0 stars 0 forks source link

devserver_stop should not try to recompile the project #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run mvn appengine:devserver_start in a project directory.
2. Edit a Java source file so that it contains a compile error.
3. Run mvn appengine:devserver_stop.

What is the expected output? What do you see instead?
Expected: In step 3, Maven should not try to recompile the project, and the 
devserver should be stopped.
Actual: In step 3, Maven tries to recompile the project and fails.  The 
devserver is not stopped.

What version of the product are you using? On what operating system?
appengine-maven-plugin:1.8.8, Apache Maven 3.1.1, Windows 7 64-bit

Please provide any additional information below.
The plugin indeed seems to specify that devserver_stop executes the 
“package” phase.  See 
https://code.google.com/p/appengine-maven-plugin/source/browse/src/main/java/com
/google/appengine/devappserver/DevAppServerStop.java?r=bec18aa848cc78184fcbb8984
5048574ae3dfec3#14.

Original issue reported on code.google.com by yu.asak...@gmail.com on 2 Jan 2014 at 10:30

GoogleCodeExporter commented 8 years ago
To make the matter worse, if the application uses Appstats, a bug of Appstats 
(http://code.google.com/p/googleappengine/issues/detail?id=7052) often makes 
the devserver unresponsive when the WAR file is updated.  This means that even 
without compile errors, devserver_stop often fails as follows:

1. User runs mvn appengine:devserver_stop, and Maven executes the “package” 
phase (because of the present issue).  As a result, the WAR file is updated.  
(This update seems to happen even if none of the source files has been updated.)
2. The running devserver detects that the WAR file was updated, and tries to 
reload the application.  Because of the bug of Appstats, this sometimes causes 
the devserver to be unresponsive.
3. The actual goal appengine:devserver_stop is executed and Maven tries to stop 
the running devserver, but because the devserver is unresponsive, it is not 
stopped.

This might be a cause of issue 30.

Original comment by yu.asak...@gmail.com on 2 Jan 2014 at 11:40

GoogleCodeExporter commented 8 years ago
I'm also having this problem and when hooking start and stop into the 
integration test phase you end up doing compile/enhance 3 times (normal, 
devserver_start, devserver_stop).

Why not make this should work like the Jetty plugin where the start goal 
executes phase 'validate' and the stop goals has no execute phase.

see:
https://github.com/eclipse/jetty.project/blob/master/jetty-maven-plugin/src/main
/java/org/eclipse/jetty/maven/plugin/JettyStartMojo.java
https://github.com/eclipse/jetty.project/blob/master/jetty-maven-plugin/src/main
/java/org/eclipse/jetty/maven/plugin/JettyStopMojo.java

Original comment by foonug...@gmail.com on 6 Apr 2014 at 9:20

GoogleCodeExporter commented 8 years ago
here is a patch that makes devserver_start, devserver_stop run like Jetty Maven 
Plugin

Original comment by foonug...@gmail.com on 6 Apr 2014 at 9:27

Attachments:

GoogleCodeExporter commented 8 years ago
Fix will be in 1.9.7
For now, you can 
$ git clone https://code.google.com/p/appengine-maven-plugin/
$ cd appengine-maven-plugin
$ mvn install

and use the version 1.9.7-SNAPSHOT in the plugin version as a workaround until 
1.9.7 is pushed

Original comment by l...@google.com on 14 Jun 2014 at 5:13