Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

How to configure cobertura to output datafile in maven

Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to run cobertura in maven so that it generates a file in a seperate location than target/cobertura/cobertura.ser. However, I find no way to configure cobertura. I tried this


and also tried `mvn clean cobertura:cobertura -Dcobertura.datafile=C:\\Salil\\Work\\cobertura-datafiles\\corbertura.ser` and that doesn't work either. I have tried ${} instead of a fixed path too. Tried java 6 and 7 and maven 3.0.2 and 3.2. None of it worked. What worked was
`mvn clean cobertura:cobertura -Dnet.sourceforge.cobertura.datafile=C:\\Salil\\Work\\cobertura-datafiles\\corbertura.ser`
which generates the given file but also creates another file in the default directory target/cobertura. I looked at the source code of cobertura maven plugin and I can see it has the old style of @parameter annotation which is in javadocs. So is it even configurable. In the end what I am trying to do is run cobertura in a specific configuration and generate a cobertura.ser file and then again in a different configuration to update the cobertura.ser file and then generate a report. What is the best way to do this? Run cobertura on the command line? Run cobertura via the ant maven task? Any other ideas?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic