You may encounter the error java.lang.OutOfMemoryError: Java heap space when running Maven. You can set the heap memory by setting the MAVEN_OPTS environmental variable.
For Linux:
- export MAVEN_OPTS=-Xmx512m
For Windows:
- set MAVEN_OPTS=-Xmx512m
Done =)
Reference: QuickTip : How to increase the Java heap memory for Maven 2 on linux