Commits

md_5 authored a48f9fafe5d
Use 1GB of ram per maven invocation.
No tags

src/main/java/org/spigotmc/builder/Builder.java

Modified
364 364 }
365 365
366 366 System.out.println( "Successfully pulled updates!" );
367 367 }
368 368
369 369 public static int runProcess(File workDir, String... command) throws Exception
370 370 {
371 371 ProcessBuilder pb = new ProcessBuilder( command );
372 372 pb.directory( workDir );
373 373 pb.environment().put( "JAVA_HOME", System.getProperty( "java.home" ) );
374 + if ( !pb.environment().containsKey( "MAVEN_OPTS" ) )
375 + {
376 + pb.environment().put( "MAVEN_OPTS", "-Xmx1024M" );
377 + }
374 378
375 379 final Process ps = pb.start();
376 380
377 381 new Thread( new StreamRedirector( ps.getInputStream(), System.out ) ).start();
378 382 new Thread( new StreamRedirector( ps.getErrorStream(), System.err ) ).start();
379 383
380 384 int status = ps.waitFor();
381 385
382 386 if ( status != 0 )
383 387 {

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut