[BUILDTOOLS-49] OutOfMemory Error with Maven even when solutions are tried Created: 25/Dec/14  Updated: 11/Dec/17  Resolved: 06/Jan/15

Status: Resolved
Project: BuildTools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Devin Skowron Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.8, BuildTools, Craftbukkit, bug, crash, spigot
Environment:

32-bit system
Windows XP SP3
Java Development Kit 1.8.0_25
Git Bash
4 GB Ram
Dell Inspiron 1420
Intel Core 2 Duo,


Attachments: Text File BuildTools.log.txt    
Plugin: BuildTools, Maven

 Description   

Any time I run BuildTools command in the Git Bash.towards the end of the process it complains about Duplicate files in the maven repository, downloads some other files, then has an OutOfMemory Error Posted Below:
[ERROR] Java heap space -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [sh, c:\Server\apache-maven-3.2.3/bin/mvn, clean, install]
at org.spigotmc.builder.Builder.runProcess(Builder.java:380)
at org.spigotmc.builder.Builder.main(Builder.java:307)
I have tried increasing RAM for Maven, exiting and shutting down processes to decrease RAM usage and I have tried deleting all files in the repository before starting the process, my server cannot update as this is a critical issue any help would be greatly appreciated!



 Comments   
Comment by Dave Hart [ 30/Dec/14 ]

You need to use:
export MAVEN_OPTS=-Xmx1G

Comment by Devin Skowron [ 25/Dec/14 ]

Xor Boole, I ran this in Command Prompt: set MAVEN_OPTS -Xmx1G and incase it needed quotations I also did set MAVEN_OPTS "-Xmx1G" but in IRC people told me that it does not work they said try closing programs and most of the RAM should automatically allocate to the Maven process but that doesn't work either.

Comment by Xor Boole [ 25/Dec/14 ]

"Did you try turning it on and off?"
How did you attempt to increase memory for maven? Adding -Xmx to BuildTools' invocation won't help, you have to set that in the $MAVEN_OPTS variable.

Generated at Sat Dec 13 16:15:06 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.