How to set cobertura data file location when using cobertura maven plugin?

I am using the cobertura maven 2.4 plugin. I see no way to set the location to store the data file (cobertura.ser) in a specific folder.

+3
source share
2 answers

Take a look at http://jira.codehaus.org/browse/MCOBERTURA-57

Arno Herrie added a comment - 09 / Dec / 07 4:16 PM

Fixed with cobertura 1.9 By default, the cobertura.ser file is now located in: ${project.build.directory}/cobertura/cobertura.ser

It can be changed in the plugin configuration using:

<plugin>
  <artifactId>cobertura-maven-plugin</artifactId>
  <configuration>
    <dataFile>${basedir}/target/test-harness/check/cobertura.ser</dataFile>
  </configuration>
</plugin>
+2
source

From the Cobertura FAQ you can use the property net.sourceforge.cobertura.datafile.

for instance -Dnet.sourceforge.cobertura.datafile=${basedir}/cobertura.ser

+1

Source: https://habr.com/ru/post/1777964/


All Articles