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.