Spring Boot项目Maven Build报错的解决方法

Posted cnb_yangwei

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Spring Boot项目Maven Build报错的解决方法相关的知识,希望对你有一定的参考价值。

问题1,

[ERROR]Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project motherBuyBoot: There are test failures

[ERROR] Please refer to D:\\web\\motherbuy\\target\\surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.

f方法:pom,xml 文件的Junit版本不对,或者其他原因,我将junit依赖注释掉,编译通过;亲测有效。

问题2,

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project motherBuyBoot: Compilation failure

[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

方法:由此联想到compile编译环境的问题,是没有配置好;看图解决,别忘了update maven

 

 

以上是关于Spring Boot项目Maven Build报错的解决方法的主要内容,如果未能解决你的问题,请参考以下文章

SpringBoot中maven打包,启动报没有主清单属性

使用spring boot 2.1.8生成的maven项目pom.xml第一行报错unknown error

spring boot 项目打包到maven仓库供其它模块使用

Maven中的Spring Boot的web项目报错Failed to configure a DataSource: ‘url‘

idea新建spring boot项目使用maven引入依赖失败,pom.xml文件中project标签报错

Spring Boot Maven 多模块打包