I get this message during build of my project
java.lang.OutOfMemoryError: Java heap space
How do I increase heap space, I\'ve
The environment variable to set is MAVEN_OPTS, for example MAVEN_OPTS=-Xmx1024m. The maxmem configuration in the pom only applies when you set the compiler plugin to fork javac into a new JVM. Otherwise the plugin runs inside the same VM as Maven and thus within the memory passed on the command line via the MAVEN_OPTS.
To set MAVEN_OPTS under Windows 7:
-Xmx1024m (or more)Open a new command window and run mvn.