【发布时间】:2014-01-20 01:49:40
【问题描述】:
我是 maven 新手,我们的项目有几个模块。我的目标是为整个项目(包含所有模块)生成一份覆盖率报告。下面是我们基于项目的POM.xml的粗略骨架
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>1.0.0</modelVersion>
<groupId>com.xx.test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>test</name>
<modules>
<module>module1</module>
<module>module2</module>
<module>module3</module>
<module>module4</module>
<module>module5</module>
</modules>
<build>
.
.
.
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
</plugin>
</plugins>
</reporting>
</project>
正如您在上面看到的,我添加了 emma 插件并执行以下操作:mvn emma:emma 这将为名为“target”的目录下的每个模块生成单独的覆盖率报告。有没有办法可以将所有这些报告合并到一个报告中? 任何指针..?
【问题讨论】: