Thursday, August 8, 2013

Problem

When you try to execute the maven comand mvn clean install shows the following message error: 
...
Exception in thread "main" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

Reason

There is not enough memory to execute all the steps necessary to the build (integration tests, start the jetty server etc.).

Solution

Creation of a environment variable MAVEN_OPTS with the value -Xmx1024m -XX:MaxPermSize=512m

Related Links

Maven throws “java.lang.OutOfMemoryError”

Setting Java heap space under Maven 2 on Windows

Problema

Ao tentar executar o comando mvn clean install apresentava o seguinte mensagem de erro (de forma reduzida):
...
Exception in thread "main" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

Motivo

Não existia memória suficiente para execução de todos os passos da construção (execução dos teste de integração, do servidor jetty etc.).

Solução

Criação da variável de ambiente MAVEN_OPTS com o valor -Xmx1024m -XX:MaxPermSize=512m

Links Relacionados

Maven throws “java.lang.OutOfMemoryError”

Setting Java heap space under Maven 2 on Windows