How to avoid OutofMemory error when building projects with Maven2

You may have encountered outofMemory issues when building source with Maven2. This normally happens when Maven runs out of available system memory.
In such case you have to set MAVEN_OPTS environment variable to increase the available memory.

In Windows
Open a command prompt in which you build the source and enter the following options. (Change the memory size according to the amount of memory in your system)
SET MAVEN_OPTS=-Xmx1024m

In Linux
Open a shell and set the options as follows.
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"

Comments

Popular posts from this blog

Common mistakes to avoid in WSO2 ESB - 1 - "org.apache.axis2.AxisFault: The system cannot infer the transport information from the URL"

Working with HTTP multipart requests in soapUI

How to configure soapUI to send HTTP chunked encoded requests