Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (45 sloc) 1.66 KB

A Java client for directly pushing artifacts Heroku via Direct-to-Heroku.


Include as a dependency:



Example of pushing a war file:

// Initialize the client
DirectToHerokuClient client = new DirectToHerokuClient("your api key");

// Prepare the payload
Map<String, File> files = new HashMap<String, File>(1);
files.put("war", new File(warFilePath));

// Deploy!
client.deploy("war", appName, files);

Running Tests

When running tests be sure to set system properties for test fixtures:

  • heroku.apiKey
  • heroku.appName

For example:

mvn test -Dheroku.apiKey=1234 -Dheroku.appName=app-used-for-fixture

Heroku API JAR Cohabitation

If you are using this JAR along with the Heroku API JAR in the same project, you will need to explictly declare Jackson version 1.8.3 in dependencyManagement section of your project's POM: