• 0.9

Quick Start with Heroku Maven Plugin

First of all, create a new application in Heroku.

Then, make sure your Maven project produces an executable JAR/WAR file, which means that it's possible run a web server from a command line, providing just an HTTP port number to it. For example:

$ java -jar my-application.jar --port=8080

Your application should start, bind itself to port 8080 and behave like an HTTP server, listening to HTTP requests and replying back with responses.

Then, make sure your Maven deploy goal deploys said WAR/JAR package to a repository available in Internet. The best two options are Sonatype for open source projects and Amazon S3 for private projects.

Now it's time to bind jcabi-heroku-maven-plugin to your deploy phase:

              <procfile>web: java -jar ./${sign}{project.artifactId}.jar --port=${sign}{PORT}</procfile>

You're ready to go. Ask Maven to deploy the artifact to the repository and then ask Heroku to pick it up and start:

$ mvn deploy

More details you can find in this page.