Live reload with appengine-maven-plugin

Google’s appengine-maven-plugin is cool. Especially for deploying your app to the cloud. But for developing it can be cumbersome, since the hot deploy mechanism is not very stable and you often have to restart the devserver. Since I wanted to get more into the whole JavaScript build chain I had a look at grunt but I just couldn’t get the configuration running with connect and livereload. And then I found this link:
First of all you have to install node.js as described here. To install the livereloadx run:

npm install -g livereloadx

With this command

livereloadx -l -p 35729 src/main/webapp/ --proxy http://localhost:8080/ 

you can start a proxy server that listens on port 35729 and checks first src/main/webapp/ for requests. If it doesn’t find the resource there it will check http://localhost:8080 for the resource. In my case the devserver run on http://localhost:8080 and the rest interface will respond to any calls that cannot be answered from src/main/webapp.

If you install the chrome plugin from
the chrome store your browser will refresh automatically

UPDATE: It seems that the current version doesn’t handle HTTP POST requests if the “prefer-local” flag is set (the “-l” in the example above). I filed a bug and I hope that this will be fixed soon:

UPDATE2: It has been fixed. Thank you very much nitoyon!

Now a beer! Did you like this post? It often takes me several hours of my free time to write one. If I was your neighbour would you offer me a beer for the hard work I did for you? The beauty is: beers can be teletransported with a painless donation using Paypal. A beer in a Swiss bar costs about USD $4.80. Or use this affiliate link if you order something on Banggood and I'll get a small kickback. Thank you!
Related:  Speeding up data store queries with self-merge joins