Live reload with appengine-maven-plugin

Do you like this post? A regular project like the PlaneSpotter Color takes many hours of my free time to develop and maintain. Would you offer me a beer for my hard work if I was your neighbour? Modern technology called teleportation makes it easy to send me a beer. Just click here. Thank you!

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: http://nitoyon.github.io/livereloadx/
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: https://github.com/nitoyon/livereloadx/issues/3




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

Posted by squix78

Leave a Reply