Maven Cobertura插件-一个针对多模块项目的报告 [英] Maven cobertura plugin - one report for multimodule project

查看:353
本文介绍了Maven Cobertura插件-一个针对多模块项目的报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用maven cobertura插件报告我的多模块项目中的代码覆盖率.

I'm using maven cobertura plugin to report code coverage in my multimodule project.

问题是我不知道如何为项目中的所有模块生成一份报告.

The problem is that I don't know how to generate one report for all modules in project.

到目前为止,我已经为每个模块生成了单独的报告,但是对于整个项目只有一个报告会很好.

So far I have generated separate reports for every module, but it would be nice to have one report for whole project.

我的父pom配置:

   <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.4</version>
        <inherited>true</inherited>
        <executions>
            <execution>
                <phase>test-compile</phase>
                <goals>
                    <goal>clean</goal>
                    <goal>cobertura</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

推荐答案

据我所知,当前不支持此功能,请参见 MCOBERTURA-65 .但是问题附有补丁,可以尝试一下.但是我的建议是使用类似 Sonar 之类的指标进行汇总.

To my knowledge, this is currently not supported, see MCOBERTURA-65. But the issue has a patch attached, maybe try it. But my suggestion would be to use something like Sonar to aggregate metrics.

这篇关于Maven Cobertura插件-一个针对多模块项目的报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆