All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.heroku.sdk.maven.DeployWarSlugMojo Maven / Gradle / Ivy

There is a newer version: 3.0.7
Show newest version
package com.heroku.sdk.maven;

import com.heroku.sdk.maven.executor.ListDependencies;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;

import java.io.File;
import java.util.ArrayList;

/**
 * Deploys a war file to Heroku
 *
 * @goal deploy-war-slug
 * @execute phase="package"
 */
public class DeployWarSlugMojo extends HerokuWarMojo {

  @Override
  public void execute() throws MojoExecutionException, MojoFailureException {
    super.execute();
    try {
      (prepareWarFile()).deploySlug(
          new ArrayList(getIncludes()), getConfigVars(), jdkUrl == null ? jdkVersion : jdkUrl, stack, slugFilename
      );
    } catch (Exception e) {
      throw new MojoFailureException("Failed to deploy application", e);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy