综合测试覆盖率报告

时间:2015-07-15 19:32:56

标签: java maven cobertura maven-site-plugin

我需要生成一份最终报告,该报告是我使用maven-site-plugin和cobertura生成的所有项目的所有报告的混合。

您可以在下面找到构建和报告中的代码

<!-- this is in the build part -->
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.4</version>
            <configuration>
                <reportPlugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <version>2.7</version>
                        <configuration>
                            <aggregate>true</aggregate>
                            <formats>
                                <format>html</format>
                                <format>xml</format>
                            </formats>
                        </configuration>
                    </plugin>
                </reportPlugins>
            </configuration>
        </plugin>


<!-- this is in the reporting part -->    
 <reporting>
 <plugins>

   <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
        <configuration>
            <check></check>
            <aggregate>true</aggregate>
            <formats>
                <format>html</format>
                <format>xml</format>
            </formats>
        </configuration>
  </plugin>

 </plugins>
</reporting>

0 个答案:

没有答案