0

我们使用 cobertura 进行代码覆盖率报告,父 pom 中的插件配置如下,

           <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <formats>
                        <format>xml</format>
                        <format>html</format>
                    </formats>
                    <aggregate>true</aggregate>
                    <outputDirectory>**/target/site/cobertura</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>clean</phase>
                        <goals>
                            <goal>cobertura</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

同样在父pom中,我们定义了如下模块,

    <modules>
        <module>module1</module>
        <module>module2</module>
        <module>module3</module>
    </modules>

这正在生成一个汇总报告,但覆盖范围是按包(按包分组的结果)。 按包装分类 我的问题是“如何生成按模块分组的覆盖结果报告”?

4

0 回答 0