From a48f9fafe5daefed9f706b8655f1b78b6275939f Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 5 Jan 2015 19:45:18 +1100 Subject: Use 1GB of ram per maven invocation. --- src/main/java/org/spigotmc/builder/Builder.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index 52bee85..4973335 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -371,6 +371,10 @@ public class Builder ProcessBuilder pb = new ProcessBuilder( command ); pb.directory( workDir ); pb.environment().put( "JAVA_HOME", System.getProperty( "java.home" ) ); + if ( !pb.environment().containsKey( "MAVEN_OPTS" ) ) + { + pb.environment().put( "MAVEN_OPTS", "-Xmx1024M" ); + } final Process ps = pb.start(); -- cgit v1.2.3