mcantrell/Zuul — pull request #62 by boxheed (2014-05-05 22:27:45+00:00)
Title: Added ability to run the war file from the commandline by embedding Jetty

Hi Mike,

Thanks for the brilliant work on Zuul, it fills a part of the jigsaw with centralized configurations that is missing. Anyway I like to run my apps on the command line rather than putting them in a container so thought you might like this tweak to the app so that it can run using an embedded Jetty container in the war file so that you can run it by doing java -jar zuul.war.

I followed these instructions here for adding Jetty support to Zuul: http://uguptablog.blogspot.co.uk/2012/09/embedded-jetty-executable-war-with.html.

The following is a summary of the changes:

* Update pom to package the war file as an executable using Jetty so it can be run as java -jar zuul.war. Note that the Jetty version isn't quite the latest.
* Moved taglibs and tagdirs to a different location in the war that Jetty expects them to be.
* Changed Spring application context to resolve the zuul-data-config.properties and ldap.properties from a file location rather than the classpath when running using Jetty. Still defaults to classpath when run as the war file within Tomcat.
* The server port is configurable on the command line by setting the System property server.port e.g. java -Dserver.port=9080 -jar zuul.war. Default is for port 8080.
* The file based config location is configurable via the command line by setting the System property conf.location and uses Spring resource prefixes e.g. java -Dconf.location=file:/home/zuul/

Let me know what you think

Cheers

Andy