打包遇到错误Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test
引自:https://blog.csdn.net/xiexiangyan/article/details/107936774
遇到的问题
有一个maven项目,我clone一下最新的代码。准备打包(maven package),没想到在执行到TEST阶段报错。百思不得其解,决定跳过测试去打包,然后部署。
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboottest: There are test failures.
解决方式:在运行mvn install或mvn package时跳过Test。
方法1:在Terminal执行命令
mvn install -DskipTests
方法2:在Terminal执行命令
mvn install -Dmaven.test.skip=true
方法3:Spring boot项目使用
spring-boot-maven-plugin插件已经集成了maven-surefire-plugin插件,会自动运行 junit test
,只需要在pom.xml里增加如下配置:
<properties>
<!-- 跳过测试 -->
<skipTests>true</skipTests>
</properties>
打包遇到错误Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test的更多相关文章
- Maven 项目打包出现错误 Failed to execute goal org.apache.maven.plugins:maven-resources-plugin
今天碰到一个奇怪的问题,就是我在eclipse中使用maven命令:clean package 命令打完包之后,通过FlashFXP将jar包上传到Linux服务器后,由于其他原因,我想要修改下程序重 ...
- maven打包工程出现错误 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
今天用maven在命令行打包项目的时候出现错误: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12. ...
- Maven错误“Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create ”解决
用maven3新建一个项目时,输入的命令如下: mvn archetype:create 出现错误如下: [ERROR] Failed to execute goal org.apache.maven ...
- 在IDEA上 使用maven进行打包时报错: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.2:jar
报错内容: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.2:jar (attach-javado ...
- 解决maven项目 maven install失败 错误 Failed to execute goal org.apache.maven.plugins
1.Maven构建失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3.4 :compile ( ...
- maven打包时出现 Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project……
maven在打包时只会默认打jar包,而那些xml等配置文件默认不打包进去的,这样的话在mybatis的配置使用中就有问题了. 要自己配置后手动打包才能将xml文件也纳入打包的范围,配置后打包发现出现 ...
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
前言 IDEA(2020)引入Maven进行依赖管理,无法从私服上下载jar包 报如下错误 Failed to execute goal org.apache.maven.plugins:maven- ...
- [转]maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test
源文URL:http://blog.csdn.net/caiwenfeng_for_23/article/details/44514947 mvn compile 没有问题,mvn package的 ...
- Maven打包时报Failed to execute goal org.apache.maven.plugins:maven-war-plugin:解决方案
问题现象: 用Maven打包时,报Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war错误. 原因分析: 打 ...
随机推荐
- Git - 简单的使用与Github
Github: Following the instructions to create repo. Git on Linux(centos): download the latest GIT and ...
- Spring Data JPA 整合Spring
1.1 Spring Data JPA 与 JPA和hibernate之间的关系 JPA是一套规范,内部是有接口和抽象类组成的.hibernate是一套成熟的ORM框架,而且Hibernate实现 ...
- 使用php进行微信小程序图片安全验证
想用到微信公众平台的图片识别系统,结果报错{"errcode":41005,"errmsg":"media data missing hint: [x ...
- Python 函数对象的本质
Python 函数对象本质上是 function 类的实例. 1 从示例说起 def factorial(n): '''return n!''' return 1 if n < 2 else n ...
- 10天,从.Net转Java,并找到月薪2W的工作(一)
大学学的是Java,但是工作一直都是.Net方面的工作. 看到各种各样的大厂都是招Java,工资比.Net高,岗位多.而.Net大多都是维护老系统,传统行业这类的工作.甚至发现工作经验不足我一半的薪水 ...
- centos升级系统自带的python2.6为python2.7
转自:https://www.cnblogs.com/terryguan/p/7233801.html 查看当前系统中的 Python 版本 python --version 返回 Python 2. ...
- [leetcode]203. Remove Linked List Elements链表中删除节点
这道题很基础也很重要 重点就是设置超前节点 public ListNode removeElements(ListNode head, int val) { //超前节点 ListNode pre = ...
- [leetcode]543. Diameter of Binary Tree二叉树的直径
题目中的直径定义为: 任意两个节点的最远距离 没想出来,看的答案 思路是:diameter = max(左子树diameter,右子树diameter,(左子树深度+右子树深度+1)) 遍历并更新结果 ...
- centos7安装手册
一:centos7下载 下载centos可以访问阿里云完成centos 7.7下载(建议使用迅雷下载):http://mirrors.aliyun.com/centos/7.9.2009/isos/x ...
- 有关em的个人理解
个人的感觉关键就是在那个font-size, 对于一开始没有设置font-size的可以默认那就是16px 后面的所有的基础都应该是在前面距离他最近的那个font-size的大小作为1em进行设置 ...