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

com.heroku.sdk.deploy.WarApp Maven / Gradle / Ivy

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

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class WarApp extends App {

  protected File warFile;

  protected File webappRunnerJar;

  public WarApp(String name) throws IOException {
    super(name);
  }

  public WarApp(String name, List buildpacks) throws IOException {
    super(name, buildpacks);
  }

  public WarApp(String client, String name, File warFile, File webappRunnerJar, File rootDir, File targetDir, List buildpacks) {
    super(client, name, rootDir, targetDir, buildpacks);
    this.warFile = warFile;
    this.webappRunnerJar = webappRunnerJar;
  }

  @Override
  public void deploy(List includedFiles, Map configVars, String jdkVersion, Map userDefinedProcessTypes, String buildFilename) throws Exception {
    includedFiles.add(webappRunnerJar);
    includedFiles.add(warFile);
    super.deploy(includedFiles, configVars, jdkVersion, new HashMap(), buildFilename);
  }

  @Override
  protected Map defaultProcTypes() {
    Map processTypes = new HashMap();
    processTypes.put("web", "java $JAVA_OPTS -jar " + relativize(webappRunnerJar) + " $WEBAPP_RUNNER_OPTS --port $PORT " + relativize(warFile));

    return processTypes;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy