Fork me on GitHub

Deploy Tutorial

This tutorial demonstrates the ease of deploying OfficeFloor applications.

Tutorial Source


To deploy an OfficeFloor application, add the following build configuration to your pom.xml:

								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />

This will create an executable jar that can be run with the following:

    java -jar <project-jar-file>

In the case of this tutorial, it is:

    java -jar DeployHttpServer-3.39.0.jar


As OfficeFloor applications can be run as a single command, it is easy to copy the jar file into a Docker image and run it.

A simple Docker build file might look as follows:

FROM openjdk:8
COPY target/DeployHttpServer-3.39.0.jar server.jar
CMD ["java", "-Dhttp.port=8080", "-jar", "server.jar"]

Various system properties can be used to configure OfficeFloor. Please see:


The next tutorial looks at deploying to Servlet container (useful for PaaS cloud providers).