Maven Surefire plugin "Error occured in starting fork, check output in log" Maven Surefire plugin "Error occured in starting fork, check output in log" java java

Maven Surefire plugin "Error occured in starting fork, check output in log"


You need to setup surefire plugin to use <forkMode>once</forkMode> like this:

<plugin>        <groupId>org.apache.maven.plugins</groupId>        <artifactId>maven-surefire-plugin</artifactId>        <version>2.5</version>            <configuration>                <skipTests>false</skipTests>                <testFailureIgnore>true</testFailureIgnore>                <forkMode>once</forkMode>            </configuration></plugin>


encountered the same issue

<plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-surefire-plugin</artifactId>    <version>2.22.1</version>    <configuration>        <useSystemClassLoader>false</useSystemClassLoader>    </configuration></plugin>  

set "useSystemClassLoader as false"