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

com.google.sitebricks.cloud.proc.DynamicCompilation Maven / Gradle / Ivy

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

import com.google.sitebricks.cloud.Config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author [email protected] (Dhanji R. Prasanna)
 */
public class DynamicCompilation {
  private static final Logger log = LoggerFactory.getLogger("sitebricks");

  public static void compile(Config config) throws Exception {
    log.info("compiling via maven");
    Proc proc = new Proc("maven: mvn package", config, true);
    proc.start(new String[] {});
    proc.stop();    // not synchronous.
    if (proc.await() != 0) {
      log.warn("compile failed.");
      proc.dumpBuffer();
    }
    log.info("compile succeeded");
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy