分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 代码编程

maven install时报错 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)

发布时间:2023-09-06 01:56责任编辑:林大明关键词:apache

今天在一个maven项目上执行maven install命令的时候一直报错,错误信息如下:

[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 3.167 s[INFO] Finished at: 2018-05-27T23:11:47+08:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project e3-manager-service: There are test failures.[ERROR] [ERROR] Please refer to E:\develop\eclipse-workspache\ExclusiveWorkspache\e3-manager\e3-manager-service\target\surefire-reports for the individual test results.[ERROR] -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

解决上述问题有两种办法:

1 安装maven工程的时候跳过测试

clean install -DskipTests

这样就能够成功安装了:

 2 将跳过测试写入pom.xml文件

<plugin> ?????????<groupId>org.apache.maven.plugins</groupId> ?????????<artifactId>maven-surefire-plugin</artifactId> ?????????<version>2.4.2</version> ?????????<configuration> ???????????<skipTests>true</skipTests> ?????????</configuration> ?</plugin> ?

maven install时报错 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)

原文地址:https://www.cnblogs.com/jepson6669/p/9098082.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved