maven打包报错:Please refer to XXXtargetsurefire-reports for the individual test results. 以及跳过test打包
在使用maven使用package打包的时候有时候会出现如下错误:
There are test failures.
Please refer to XXX/target/surefire-reports for the individual test results
这个表示测试失败导致的打包失败,解决方法就是跳过test打包。
1.命令行形式(万能)
命令1:mvn package -Dmaven.test.skip=true
或
命令2:mvn package -DskipTests
或
命令3:mvn package -Dmaven.test.failure.ignore=true
以上均均可,但有一定的区别
命令1:不执行测试用例,也不会编译测试用例
命令2:不执行测试用例,会编译测试用例(如果编译也报错那么么就使用命令1)
命令3:忽略test的错误就算是失败了也继续构建
2.配置pom文件的形式
2.1. 添加plugin(引入的时候爆红,不碍事)
方法1:相当于命令3
<plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><configuration><testFailureIgnore>true</testFailureIgnore></configuration></plugin></plugins>
方法2:相当于命令2
<plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><configuration><skipTests>true</skipTests></configuration></plugin></plugins>
2.2 配置SpringBoot的形式
方法1:不会编译测试类,同命令1
<properties><maven.test.skip>true</maven.test.skip></properties>
方法2:会编译测试类,同命令2
<properties><skipTests>true</skipTests></properties>
3.利用idea的形式
点击这个闪电标志,然后发现test被划掉了,再点击packge就可以了
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
maven打包报错:Please refer to XXXtargetsurefire-reports for the individual test results. 以及跳过test打包相关推荐
- pyinstaller打包报错 Failed to execute script ‘xxx‘ due to unhandled exception:input():lost sys.stdin
pyinstaller打包报错 Failed to execute script 'xxx' due to unhandled exception:input():lost sys.stdin pyi ...
- maven 打包报错 surefire-reports for the individual test results.
Eclipse Maven打包报错 [ERROR] [ERROR] Please refer to D:\File\workspace\izh-common-util\target\surefire- ...
- Maven 新版本 3.8.1 打包报错 maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories
Maven 新版本 3.8.1 打包报错 maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories [ ...
- maven打包报错You have to use a classifier to attach supplemental artifacts to the project instead of rep
maven打包报错You have to use a classifier to attach supplemental artifacts to the project instead of rep ...
- maven打包报错找不到符号,由于找不到类中方法的解决思路
maven打包报错找不到符号,若pom文件引用正常,报错的类有修改能正常启动执行程序,很有可能因为该类属于公共工具类,在外层目录,通过pom引用的,修改后工具类后,打包时没有将其重新打包,导致该出引用 ...
- maven打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cle
问题记录: maven打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cle 解决办法: 这个 ...
- idea 打包报错 Could not find artifact com.ruoyi:ruoyi-framework:pom:4.6.1 in public (http://maven.aliyun
在IDEA 的 setting→Build,Execution,Deployment→Build Tools→Maven→Runner下 找到VM Options: 添加以下代码 -Dmaven.wa ...
- 【jenkins打包maven项目报错记录】
jenkins打包maven项目报错记录 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3 ...
- idea编译报错:Refer to the generated Javadoc files in ‘..targetapidocs‘ dir. 解决
idea编译报错:Refer to the generated Javadoc files in '-\target\apidocs' dir. 解决 错误信息 Failed to execute g ...
最新文章
- 【宽搜】XMU 1039 Treausure
- ssh遇到port 22:No route to host问题的解决方法
- 用python画烟花-用python做一个烟花show
- [python] 使用scikit-learn工具计算文本TF-IDF值
- java轻功游戏,会轻功又可以飞的游戏(3d大型游戏)
- 什么笔记本电脑好用_苹果笔记本好用吗?苹果笔记本怎么样?
- Linux常出现的面试试题
- Dangling meta character '?' near index 0
- Hive 内部表外部表
- C++14::lambda函数的类型
- C 不使用其他库生成BMP图片
- Spring+Stomp+ActiveMq实现websocket长连接
- Python实现Eternal Night游戏(尚未完结,不断更新)
- android之标准体重
- springcloud如何制作一个物联网产品
- anyRTC 重磅推出在线实时 K 歌解决方案
- 约瑟夫环!编 号是1,2,??,n的n个人按照顺时针方向围坐一圈,每个人只有一个密码(正整数)。一开始任选一个正整数作为报数上限值m,从第一个仍开始顺时针方向 自1开始顺序报数,报到m时停止报数。
- 在线选毕业照片相册系统开发
- python计算导数_python计算导数并绘图的实例
- 2016淘宝首页改版 细说淘宝首页设计变化史
热门文章
- 亚马逊计划在中国推出Kindle
- 2019 ICCV best paper:sinGAN: Learning a Generative Model from a Single Natural Image解读
- Android模拟器Genymotion安装向导
- java emr_java – EMR – 在Hadoop(和YARN)中使用自定义日志记录appender
- 数字化转型有必要吗?
- “2020中小企业产融结合高峰论坛”在京隆重举行
- canvas意料之外获得降龙十八掌的效果
- MotionBuilder与NOKOV度量动捕系统连接教程
- 导轨式安装智能多户电表的价格
- 文件传输校验-crc32校验算法