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

时间:2022-08-25 21:22:21

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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.167 s
[INFO] Finished at: --27T23::+:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.: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 ]
[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 ] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

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

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

clean install -DskipTests

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

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

这样就能够成功安装了:

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

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)的更多相关文章

  1. maven install时报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-compiler-plugin&colon;2&period;3&period;2&colon;compile

    首先检查父项目,子项目的jdk版本是否一致,编码格式是否一致我的问题就错在了编码格式上,父项目用的是UTF-8,子项目新建的,默认GBK这时,使用maven install命令出错 提示:[INFO] ...

  2. maven install时报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-surefire-plugin&colon;2&period;12&period;4&colon;test

    事故现场: 解决办法: 一是命令行, mvn clean package -Dmaven.test.skip=true 二是写入pom文件, <plugin> <groupId&gt ...

  3. maven build时报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-surefire-plugin&colon;2&period;12&period;4&colon;test

    [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ ...

  4. maven install 报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-compiler-plugin&colon;3&period;1&colon;compile &lpar;default-compile&rpar; on project&ast;&ast;&ast;&ast;&ast;

    [ERROR]Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-co ...

  5. 启动Maven项目时报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-clean-plugin&colon;2&period;5&colon;clean &lpar;default-clean&rpar; on project &ast;&ast;-web&colon; Failed to clean project&colon; Failed to delete E&colon;&bsol;&ast;&ast;&bsol;target&bsol;tomcat&bsol;logs&bsol;access&lowbar;lo

    这类错误 出现这种错误,通常是由于您已启动了另一个tomcat 进程或者运行的javaw.exe进程,导致报错. 解决方法: 1. 鼠标点击 X 进行关闭运行失败的 Console页,(如果运行多次, ...

  6. maven install 报错 Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-surefire-plugin&colon;2&period;12&period;4&colon;test

    pom文件引入以下依赖 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId&gt ...

  7. mvn install 报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-compiler-plugin&colon;2&period;3&period;2 错误&colon; 找不到符号

    报错信息 在Eclipse中执行mvn install时,console端显示如下报错信息: [ERROR] Failed to execute goal org.apache.maven.plugi ...

  8. 在IDEA上 使用maven进行打包时报错&colon; Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-javadoc-plugin&colon;2&period;10&period;2&colon;jar

    报错内容: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.2:jar (attach-javado ...

  9. 解决maven项目 maven install失败 错误 Failed to execute goal org&period;apache&period;maven&period;plugins

    1.Maven构建失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3.4 :compile ( ...

随机推荐

  1. HashBytes&lpar;Transact-SQL&rpar;

    返回其输入的MD2.MD4.MD5.SHA或SHA1哈希值 语法 HashBytes('<algorithm>',{@input|'input'}) <algorithm>:: ...

  2. 《BI那点儿事》数据流转换——数据转换

    数据转换执行类似于T-SQL中的函数CONVERT或CAST的功能.数据转换的编辑界面如图,选择需要转换的列,在DataType下拉列表中选择需要的数据类型.Output Alias栏内设置输出时使用 ...

  3. Java容器类接口&colon;Iterator&comma;Collection&comma;Map

    Iterator Iterator被称为迭代器,是一个对象,它的工作是遍历并选择序列中的对象,可以实现以下一些操作: 使用方法iterator()要求容器返回一个Iterator,Iterator将返 ...

  4. java 图片处理

    /* * 图片处理类 */ package image; import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.j ...

  5. 食物卡喉别拍背部!救了100多万人性命的&OpenCurlyDoubleQuote;海姆立克急救法&quot&semi;

    先讲三个事例: 一.近日,浙江金华一个17月大的小贝边玩边吃花生,被噎住.10多分钟后,奶奶发现小贝大口喘气,以为他玩累了就抱他回家,等父母赶到送医已晚.小贝大脑受损严重-父母含泪同意放弃治疗,孩子走 ...

  6. 第一个GTK&plus;程序

    在这一章节中,我们将开始编写第一个GTK+程序. 超级简单的例子 我们要“制造”一个超级简单的GTK+程序.就是显示一个空白的窗口. #include <gtk/gtk.h> int ma ...

  7. 使用maven profile实现多环境可移植构建

    mvn clean package -Pproduction即构建出生产环境需要的war包 mvn tomcat:redeploy -Ptest 即发布到测试环境 在开发过程中,我们的软件会面对不同的 ...

  8. Stbdroid之ShapeDrawable

    Shape可以定义矩形.椭圆形.线条.圆形 <?xml version="1.0" encoding="utf-8"?> <shape xml ...

  9. Python web框架有哪些

    简单易学的web.py, 大型的django:文档最完善.市场占有率最高.招聘职位最多. Tornado 具体看:http://feilong.me/2011/01/talk-about-python ...

  10. spring&plus;struts2&plus;hibernate整合

    web.xml需要配置 <context-param> <param-name>contextConfigLocation</param-name> <par ...