Plugin Documentation

Goals available for this plugin:

GoalDescription
heroku:deploy

Deploys the staging (prepared) repository under Heroku.

See the docs for PrepareMojo as well.

Obligatory showoff example (for existing java projects):

  <plugins>
    <plugin>
      <groupId>br.com.ingenieux.cedarhero</groupId>
      <artifactId>heroku-maven-plugin</artifactId>
      <configuration>
        <app>lovely-app-7777</app>
      </configuration>
    </plugin>
  </plugins>

Once pom is configured (and you've got a packaged war project in the right directory), you can simply prepare and deploy with:

$ mvn heroku:prepare heroku:deploy

heroku:helpDisplay help information on heroku-maven-plugin.
Call mvn heroku:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
heroku:prepare

Creates / prepares a Staging Repository for Heroku Deployment

A Staging Repository is a git repository (by default, under [basedir]/tmp-git-deployment-staging) made from the following elements:

The sourceStack includes a "stub pom", meant to satisfy herokus' need for a pom.xml.

In the future, it would be used to optimize the slug generation process (like assigning/replacing xml config files for addon values, or something like that).

For now, a barebones sourceStack git repository includes:

  • The basic Procfile
  • The webapp Runtime
  • Other settings

You could consider either forking the sourceStackRepository or changing it locally prior to deployment. Future versions will pay more attention to it

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0
JDK1.6
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>br.com.ingenieux.cedarhero</groupId>
          <artifactId>heroku-maven-plugin</artifactId>
          <version>0.0.3-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>br.com.ingenieux.cedarhero</groupId>
        <artifactId>heroku-maven-plugin</artifactId>
        <version>0.0.3-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"