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

后端 未结 6 704
萌比男神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:19

    This is due to a known bug in the Maven Surefire plugin. It was fixed in version 3.0.0-M1, which was released in November 2018. So the simplest and most reliable fix is to upgrade which version of the plugin you use.

    Updating the maven-surefire-plugin from 2.12.4 to 3.0.0-M1 worked for me. The project did not explicitly use the plugin, so I had to add a new plugin dependency.

    
       ...
       
          maven-surefire-plugin
          3.0.0-M1
       
       ...
    
    

提交回复
热议问题