https://issues.apache.org/jira/browse/SUREFIRE-753

Here the pom.xml snippet how i configured the report-plugin:

      <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.9</version>
<configuration>
<outputName>failsafe-report</outputName>
<reportsDirectories>
<reportsDirectory>${project.build.directory}/failsafe-reports</reportsDirectory>
</reportsDirectories>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>

This means the name of the link in the navigation must be changed as well. May be it's needed to have a supplemental configuration parameter for this or the outputName could be used instead.

maven-surefire-plugin是maven默认的test执行器。而maven-surefire-report-plugin是site生成test报表的一个插件。maven-surefire-report-plugin默认目标是report,这个将告诉maven执行test,然后搜集surefire-reports下xml生成报告。 而默认mvn site也会执行一次test。所以造成执行两次,解决办法:

< plugin >
  < groupId >org.apache.maven.plugins< /groupId >
  < artifactId >maven-surefire-report-plugin< /artifactId >
  < version >2.7< /version >
  < reportSets >
    < reportSet >
    < reports >
      < report >report-only< /report >
    < /reports >
    < /reportSet >
  < /reportSets >
< /plugin >

将其目标更改report-only,则告诉报表插件,自己不用执行test了,直接使用生命周期里test的执行 surefire-reports结果。bug新颁布已经解决了。

【转】maven同时使用maven-surefire-report-plugin和maven-surefire-plugin默认将执行两次test的更多相关文章

  1. Maven提高篇系列之(二)——配置Plugin到某个Phase(以Selenium集成测试为例)

    这是一个Maven提高篇的系列,包含有以下文章: Maven提高篇系列之(一)——多模块 vs 继承 Maven提高篇系列之(二)——配置Plugin到某个Phase(以Selenium集成测试为例) ...

  2. maven报错【Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of】

    [自己的操作] (1)windows -> Preferences -> maven 的settings.xml文件中.m2的位置已经失效,更改正确后尝试 (2)pom.xml还有下面错误 ...

  3. maven系列(2)-第一个maven的项目

    上一篇简单了介绍了maven和maven的安装,这篇介绍如何用maven创建项目. 1. 命令行创建maven项目 maven创建项目很简单,直接调用mvn archetype:generate命令即 ...

  4. Spark之路 --- Scala IDE Maven配置(使用开源中国的Maven库)和使用

    为什么要使用Maven 摘自百度百科的介绍 Maven是基于项目对象模型(POM),可以通过一小段描述信息来管理项目的构建,报告和文档的软件项目管理工具.Maven 除了以程序构建能力为特色之外,还提 ...

  5. eclipse 创建maven 项目 动态web工程完整示例 maven 整合springmvc整合mybatis

    接上一篇: eclipse 创建maven 项目 动态web工程完整示例 eclipse maven工程自动添加依赖设置 maven工程可以在线搜索依赖的jar包,还是非常方便的 但是有的时候可能还需 ...

  6. maven(二):创建一个可用的maven项目,完整过程

    环境:eclipse4.5 (内置maven插件) 创建maven项目 文件菜单--新建--其他-- maven project 下一步 选择web 结构 group id:  指项目在maven本地 ...

  7. (转)Maven学习总结(七)——eclipse中使用Maven创建Web项目

    孤傲苍狼只为成功找方法,不为失败找借口! Maven学习总结(七)——eclipse中使用Maven创建Web项目 一.创建Web项目 1.1 选择建立Maven Project 选择File -&g ...

  8. Maven 使用了一个标准的目录结构和一个默认的构建生命周期。

    Maven 使用了一个标准的目录结构和一个默认的构建生命周期. 约定优于配置 当创建 Maven 工程时,Maven 会创建默认的工程结构.开发者只需要合理的放置文件,而在 pom.xml 中不再需要 ...

  9. Maven学习一:使用Myeclipse创建Maven项目

    使用Myeclipse2014创建Maven项目有如下几种方式: 1.创建Maven Java项目 1.1 选择新建Maven项目 1.2.选择创建简单项目 1.3.填写项目信息 1.4.创建成功后项 ...

随机推荐

  1. 一次简单的ctf SQL注入绕过

    注入地址:http://103.238.227.13:10087/index.php?id=1 //过滤sql $array = array('table','union','and','or','l ...

  2. 审计一波appcms-持续更新。

    废话 看到土司大牛都在审计,作为彩笔也要审计下去.该文章置顶持续更新.大家有啥可以评论区交流. 先对其目录进行分析 -admin/ #后台文件 - - -cache/ #缓存目录 -core/ #核心 ...

  3. vue-router "path" is required in a route configuration

    启用了动态路由,一直提示这个错误,页面打开也是空白,后来发现原来是component参数错误. 正确的写法为: component: () => import ('@/views/own-spa ...

  4. [转]你所不知的 CSS ::before 和 ::after 伪元素用法

    SS 有两个说不上常用的伪类 :before 和 :after,偶尔会被人用来添加些自定义格式什么的,但是它们的功用不仅于此.前几天发现了 Creative Link Effects 这个非常有意思的 ...

  5. 解决MYSQL ERROR 1045 (28000)问题

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)   Red Hat Enterpr ...

  6. 为什么页面设计宽度要控制在960px

    其实这里涉及到了一个网页栅格系统的问题,而且这个观念是从苹果的设计师那里来的 网站 首页页面宽度 px Yahoo! 950 淘宝 950 MySpace 960 新浪 950 网易 960 Live ...

  7. Python urllib2 proxy

    在 正式并入某大公司之后,网络必须设置为统一的proxy,好的方面没看到,但是立即让我一的一个小工具不能工作了.在之前使用urllib2库,无需设置proxy,一切工作正常.在必须使用proxy之后, ...

  8. hazelcast初探

    Hazelcast作为一个高度可扩展的数据分发和集群平台,提供了高效的.可扩展的分布式数据存储.数据缓存.Hazelcast是开源的,在分布式技术方面,Hazelcast提供了十分友好的接口供开发者选 ...

  9. 将html转换为Drupal模板文件的一般步骤

    本篇文章以自定义page.tpl.php文件为例,介绍在Drupal主题开发工作中,将html文件转换为tpl模板文件的一般步骤. 仅保留html文件中body标记之间的内容(不含body标记),其他 ...

  10. print、print_r、echo到底有什么区别?

    echo和print都可以做输出,不同的是,echo不是函数,没有返回值,而print是一个函数有返回值,所以相对而言如果只是输出 echo 会更快,而print_r通常用于打印变量的相关信息,通常在 ...