今天在调试一个UT job的时候发现找不到cobertural报告文件,后来发现在Maven的自项目里找到了对应的代码覆盖率报告,但都是是分散在每个子项目下面的,看起来很不方便。就在想是不是可以把这些报告都汇集到一起呢?结果还真是被我在stackoverflow里找到了。下面是原帖内容,我就一并粘过来吧:

The plugin has been updated since this question was asked (and last answered) to now enable aggregated reporting, via the aggregate configuration property in the parent POM.

This produces the aggregated coverage report at target/site/cobertura/index.html which will include all modules.

(Each module will also have it's own report produced, if that is of any use.)

Parent pom.xml

<modules>
<module>moduleA</module>
<module>moduleB</module>
<module>moduleC</module>
<modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<check/>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<aggregate>true</aggregate>
</configuration>
</plugin>
...
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
</plugins>
...
</build>

【原创】Maven cobertura整合多个子项目下的单测覆盖率报告的更多相关文章

  1. Atitit.你这些项目不都是模板吗?不是原创  集成和整合的方式大总结

    Atitit.你这些项目不都是模板吗?不是原创  集成和整合的方式大总结 1.1. 乔布斯的名言:创新即整合(Creativity is just connecting things).1 1.2. ...

  2. spring springmvc mybatis maven 项目整合示例-导航页面

    spring原理 实践解析-简单的helloworld spring原理案例-基本项目搭建 01 spring framework 下载 官网下载spring jar包 spring原理案例-基本项目 ...

  3. Maven+SSM整合.doc

    Maven + SSM整合 1开发环境搭建 1.1Eclipse4.7(Oxygen) + Tomcat8 + Maven3.5.2 2Maven Web项目创建 2.1新建maven项目 2.2 选 ...

  4. Maven项目整合SSH框架

    ---------------------siwuxie095                                         Maven 项目整合 SSH 框架         创建 ...

  5. Maven项目整合Struts2框架

    -------------------------siwuxie095                                 Maven 项目整合 Struts2 框架         1. ...

  6. Spring+SpringMVC+MyBatis+Maven框架整合

    本文记录了Spring+SpringMVC+MyBatis+Maven框架整合的记录,主要记录以下几点 一.Maven需要引入的jar包 二.Spring与SpringMVC的配置分离 三.Sprin ...

  7. maven单测生成覆盖率报告---Jacoco的使用

    JaCoCo介绍 一.JaCoCo简述 JaCoCo是一个开源的覆盖率工具,它针对的开发语言是java,其使用方法很灵活,可以嵌入到Ant.Maven中:可以作为Eclipse插件,可以使用其Java ...

  8. ssh框架整合---- spring 4.0 + struts 2.3.16 + maven ss整合超简单实例

    一 . 需求 学了这么久的ssh,一直都是别人整合好的框架去写代码,自己实际动手时才发现框架配置真是很坑爹,一不小心就踏错,真是纸上得来终觉浅! 本文将记录整合struts + spring的过程 , ...

  9. 基于Maven构建整合SpringMVC+Mybtis+Druid

    前几天趁空闲时间整合了下SpringMVC+Mybatis+Druid,这里小记录下,这个Demo是基于Maven构建的,数据源用的是阿里巴巴温少的开源项目Druid,数据库用的是Mysql. 由于E ...

随机推荐

  1. Flink之状态之checkpointing

    1.前言 在Flink中,函数和操作符都可以是有状态的.在处理每个消息或者元素时,有状态的函数都会储存信息,使得状态成为精密操作中关键的组成部分. 为了使状态能够容错,Flink会checkpoint ...

  2. 通过数据库评估存储设备IO性能-Oracle11gIO校准功能介绍

    通过数据库评估存储设备IO性能 ---------Oracle11g IO校准功能介绍 前言 I/O子系统是ORACLE数据库的一个重要组成部分,因为I/O操作是贯穿数据库管理全过程,它操作的对象包括 ...

  3. RxJS & Angular

    RxJS & Angular https://www.learnrxjs.io/ https://rxjs-cn.github.io/learn-rxjs-operators/ https:/ ...

  4. 计蒜客16495 Truefriend(fwt)

    #include <iostream> #include <cstring> #include <cstdio> using namespace std; type ...

  5. gcc用法小记

    By francis_hao    Feb 13,2017 概要 这里只列出了最常用的选项   选项解释 -c|-S|-E 启动gcc编译器时,它会顺序执行预处理.编译.汇编和连接(四个阶段的详细介绍 ...

  6. WebOS系列-了解Wekbit【邓侃】

    注:[转载请注明文章来源.保持原样] 出处:http://www.cnblogs.com/jyli/archive/2010/02/02/1660634.html  作者:李嘉昱 这是Kan老大的We ...

  7. [Book Content]Python进阶

    python进阶 原书内容https://github.com/eastlakeside/interpy-zh 通过记录书本目录和大概内容做一个记录,方便以后回顾检索. Chapter Title B ...

  8. Python 入门学习笔记

    安装和运行 官网下载安装包https://www.python.org/downloads/mac-osx/下载完直接安装即可 运行打开 terminal,输入命令 python,进入 python ...

  9. Linux echo命令打印带有颜色的字

    一.命令格式如下: echo -e "\033[字背景颜色;文字颜色m字符串\033[0m"            例如:                      echo -e ...

  10. windows下mysql 5.7的配置全过程

    这是一套在好多次的安装下总结出来的经验,包括很多种遇到的问题,查过很多资料,特此总结一下. 一.从官网下载MySQL的zip(免安装的) 解压mysql-5.7.11-winx64.zip到自己指定的 ...