As of today, my maven compile fails.
[INFO] [ERROR] Unexpected
[INFO] java.lang.OutOfMemoryError: Java heap space
[INFO] at java.util.Arrays.copyOfRange(Arrays.java:2694)
[INFO] at java.lang.String.<init>(String.java:203)
[INFO] at java.lang.String.substring(String.java:1877)
[ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)
As of yesterday I had successfully run a maven compile.
As of today, I just bumped up my heap to 3 GB. Also, I only changed 2-3 minor lines of code, so I don't understand this 'out of memory' error.
vagrant@dev:/vagrant/workspace$ echo $MAVEN_OPTS
-Xms1024m -Xmx3000m -Dmaven.surefire.debug=-Xmx3000m
EDIT: I tried the poster's comment by changing my failed module's pom.xml. But I got the same maven build error.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<fork>true</fork>
<meminitial>1024m</meminitial>
<maxmem>2024m</maxmem>
</configuration>
</plugin>
-Xmx
. – Hearts