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

com.google.sitebricks.cloud.mix.LauncherMix Maven / Gradle / Ivy

The newest version!
package com.google.sitebricks.cloud.mix;

import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.FileWriter;
import java.util.Map;
import java.util.Set;

/**
 * @author [email protected] (Dhanji R. Prasanna)
 */
class LauncherMix implements Mix {

  @Override
  public void mix(Map properties, Set deps) throws Exception {
    File procfile = new File("Procfile");
    if (procfile.exists()) {
      LoggerFactory.getLogger("init").warn("Procfile already exists. skipped.");
    } else {
      String main = properties.get("projectPackage").toString() + ".Main";
      FileWriter writer = new FileWriter(procfile);
      writer.write("web: java -cp target/classes:target/dependency/* " + main + "\n");
      writer.flush();
      writer.close();
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy