Increase Java Heap Memory for Maven
If you ever encounter an error saying Java heap is not enough, while building a project using Maven, the following content will help to get out of it. Thanks Charitha for finding this.Set the MAVEN_OPTS system property,
e.g. MAVEN_OPTS=-Xmx1024m will give you 1024 Mb heap
Subscribe to:
Post Comments
(
Atom
)
Thx man! Useful.
ReplyDeleteIndeed Nice tip. I am increasingly using Maven for managing dependency despite having biased on ANT earlier. I have also shared How to increase Heap size in Maven and ANT you find useful.
DeleteYeah, you can set the min-max range as well... using -Xms for min, and -Xmx for max. Btw, these are VM args and can be specified at maven, ant, or any other way in which you can specify VM args.
ReplyDeleteRegards,
Senaka