【问题标题】:How to get maven not to fail a build when it fails a test如何让 Maven 在测试失败时不失败构建
【发布时间】:2013-12-12 00:58:08
【问题描述】:

我正在为测试创建一个报告机制,我希望它在所有测试运行后执行,并且生成的 junit xml 文件被写出。不幸的是,在测试阶段失败后似乎没有继续执行。如果可能的话,有谁知道我可以使用什么 Maven 配置来获得所需的结果。非常感谢。

【问题讨论】:

标签: java maven


【解决方案1】:

这可能有帮助吗?

 <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <testFailureIgnore>true</testFailureIgnore>
        </configuration>
      </plugin>

【讨论】:

    猜你喜欢
    • 2013-05-24
    • 2020-01-16
    • 2015-04-25
    • 2019-10-17
    • 2010-11-26
    • 1970-01-01
    • 2017-12-04
    • 2017-03-23
    • 2023-03-22
    相关资源
    最近更新 更多