Maven error occurred in starting fork, check output in log Maven error occurred in starting fork, check output in log docker docker

Maven error occurred in starting fork, check output in log


I was facing the same issue, adding below worked for me: version 3.0.0-M3 fixes the problem

<plugin>                <groupId>org.apache.maven.plugins</groupId>                <artifactId>maven-surefire-plugin</artifactId>                <version>3.0.0-M3</version>        <configuration>            <forkCount>0</forkCount>            <testFailureIgnore>true</testFailureIgnore>        </configuration></plugin>


I was also facing the same issue.

[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: Error occurred in starting fork, check output in log

In my context, I was building a spring boot application. All tests were ok, BUT, the application did not close properly due to an issue in the app code shutdown process. I guess that the process was not returning an exit code equals to 0.

Once we fixed this shutdown issue, this surefire plugin exception did not occured anymore.

It may be an hint to your problem.


I also faced this in my local environment (build was working fine on other environments). So I did not revise pom.xml, instead, I added forkCount=0 as command line argument and it solved the problem. Like:

mvn clean install -DforkCount=0