For Git deployment, we will send the code to tsuru, and compile the classes
there. For that, we’re going to use mvn with the Jetty plugin.
For doing that, we will need to create a Procfile with the command for starting
the application:

$ cat Procfile
web: mvn jetty:run

In order to compile the application classes during deployment, we need also to
add a deployment hook. tsuru parses a file called tsuru.yaml and runs some
build hooks in the deployment phase.

Here is how the file for the helloweb application looks like:

$ cat tsuru.yaml
hooks:
build:
- mvn package

After adding these files, we’re ready for deploying the application. The
command app-info command will display a Git remote that we can use to push
the application code to production:

In the Java platform provided by tsuru, users can use two version of Java: 7
and 8, both provided by Oracle. There’s an environment variable for defining
the Java version you wanna use: JAVA_VERSION. The default behavior of the
platform is to use Java 7, but you can change to Java 8 by running:

In the Java platform provided by tsuru, users can use units with different plans and each plan may have containers with different amounts of memory. There’s an environment variable for defining the max amount of heap memory (in megabytes) that Java should use: JAVA_MAX_MEMORY ( it’s equal -Xmx). The default value for this environment variable is 128 (it can be different according to your basebuilder).