com.heroku.sdk.maven.DeployWarSlugMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of heroku-maven-plugin Show documentation
Show all versions of heroku-maven-plugin Show documentation
Maven plugin for deploying applications to Heroku
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);
}
}
}