Embed-your-webapp into jetty7 example
Pull request Compare This branch is 9 commits behind bekkopen:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
etc
src/main/java/bekkopen/jetty
README.md
pom.xml

README.md

Usage

  • Add your war file artifact to the Maven pom.xml
  • Build it mvn clean install
  • Run it java -jar yourWebApp-version.jar start

Configuration

Create a secret (i.e. one per environment):

:➜ md5sum yourWarFile.war
eb27fb2e61ed603363461b3b4e37e0a0  yourWarFile.war

Create a configuration file:

:➜ cat > /etc/bekkopen/appname.properties
jetty.contextPath=/appname
jetty.port=7000
jetty.workDir=/var/apps/appname/
jetty.secret=eb27fb2e61ed603363461b3b4e37e0a0
[ctrl+d]

Start it with a configuration file (default: CWD/jetty.properties):

:➜ java -Dconfig=/etc/bekkopen/appname.properties -jar appname-1.0.0rc0.jar

Override individual properties:

:➜ java -Djetty.port=7001 -jar appname-1.0.0rc0.jar

(I didn't bother implementing combinations of system properties and resource properties - we i.e. use Constretto in our own launcher).