Spring Boot fails to run maven-surefire-plugin ClassNotFoundException org.apache.maven.surefire.booter.ForkedBooter

后端 未结 6 693
萌比男神i
萌比男神i 2020-12-08 02:00

Running maven (3.5.2) build of a Spring Boot 2.0.2.RELEASE applicaton (generated by web initialiser with web dependencies) fails executing the maven

6条回答
  •  粉色の甜心
    2020-12-08 02:16

    To me, the solution was to run mvn as

    _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true mvn clean compile package
    

    Other ideas (giving the system property to the maven argument list, different changes in pom.xml, settings.xml) did not work.

    Despite that it didn't contain the exact solution, also this answer was very helpful for me to make it clear, that it is an unfortunate cooperation of two independent, alone harmless bugs in the Ubuntu JDK and the Maven Surefire Plugin.

    Recent Debian (buster) with the same JDK and Maven versions doesn't seem affected by the problem, but Ubuntu (xenial) did.

    The exact solution is coming from this answer.

    Update from the future: with Debian Buster is alles okay and this workaround is not needed any more.

提交回复
热议问题