aspose file tools*
The moose likes Java in General and the fly likes Maven - Could not reserve enough space for object heap error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Maven - Could not reserve enough space for object heap error" Watch "Maven - Could not reserve enough space for object heap error" New topic
Author

Maven - Could not reserve enough space for object heap error

David McWilliams
Ranch Hand

Joined: Mar 14, 2009
Posts: 73
I am Maven to build my Java project. After several successful build, I am now getting the following error:


In my maven.sh file that my build is using, I have added the following as the first line

I am still getting the error.

It fails very early in the build. I am using a Windows machine and the Linux emulator Cygwin to run my maven build. The build also fails when I try it in Windows. It previously worked in Cygwin but not now.

It seems to work in Windows and Cygwin when I skip tests so it would seem the tests are breaking it.

Can anyone suggest a fix?

Edit: The solution was to set the forkMode of maven-surefire-plugin to 'never'. It seems that when tests are run, maven sure fire spawns a new JVM. Setting it to never fixed the issue.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Maven - Could not reserve enough space for object heap error