If you have ever run into an issue with the Java Heap space when doing a Maven build, you can easily give more memory to Java. The error message from Maven will look like:
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: Java heap space
I am on a mac, so it’s as simple as modifying the ~/.bash_profile file, adding the following two lines:
export _JAVA_OPTIONS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m"