[英]How can I set the location for the cobertura data file when using the cobertura maven plugin?
I am using cobertura maven plugin 2.4. 我正在使用cobertura maven插件2.4。 I don't see any option to set the location to store the datafile (cobertura.ser) to a particular folder.
我没有看到任何设置将数据文件(cobertura.ser)存储到特定文件夹的位置的选项。
Have a look at http://jira.codehaus.org/browse/MCOBERTURA-57 看看http://jira.codehaus.org/browse/MCOBERTURA-57
Arnaud Heritier added a comment - 09/Dec/07 4:16 PM
Arnaud Heritier添加了评论 - 09 / Dec / 07 4:16 PM
Fixed with cobertura 1.9 By default the cobertura.ser file is now in:
${project.build.directory}/cobertura/cobertura.ser
使用cobertura 1.9修复默认情况下,cobertura.ser文件现在位于:
${project.build.directory}/cobertura/cobertura.ser
It can be changed in the plugin config with:
它可以在插件配置中更改为:
<plugin>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<dataFile>${basedir}/target/test-harness/check/cobertura.ser</dataFile>
</configuration>
</plugin>
From the Cobertura FAQ , you could use the property net.sourceforge.cobertura.datafile
. 从Cobertura常见问题解答中 ,您可以使用属性
net.sourceforge.cobertura.datafile
。
For instance -Dnet.sourceforge.cobertura.datafile=${basedir}/cobertura.ser
例如
-Dnet.sourceforge.cobertura.datafile=${basedir}/cobertura.ser
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.