【发布时间】:2012-02-05 04:23:31
【问题描述】:
我有一个多模块 Maven 项目。我想为网站生成一份汇总的 cobertura 报告。正在运行mvn site 的模块是 pom-packaging,所以 maven 在生成站点时给我这个
[INFO] >>> cobertura-maven-plugin:2.5.1:cobertura (report:cobertura) @ parent >>>
[INFO]
[INFO] --- cobertura-maven-plugin:2.5.1:instrument (report:cobertura) @ parent ---
[INFO] Skipping cobertura mojo for project with packaging type 'pom'
[INFO]
[INFO] <<< cobertura-maven-plugin:2.5.1:cobertura (report:cobertura) @ parent <<<
[INFO] Not executing cobertura:report as the cobertura data file (/home/user/parent/target/cobertura/cobertura.ser) could not be found
相关的pom部分:
...
<reportPlugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
</reportPlugins>
...
Cobertura 只生成一个空的target/site/cobertura/index.html 文件。有没有办法“强迫” cobertura 跑?或者以其他方式获取我的汇总报告?
【问题讨论】:
-
forceMoojoExecution 似乎不起作用。有解决办法吗?
标签: maven maven-plugin cobertura