Aggregated cobertura report will execute cobertura on each module and then merge the single reports. It will not help if, for example, you have tests in module A and want to have coverage of module B.
On Sat, Jun 30, 2012 at 10:46 AM, Patrick Mohr <kc7...@gmail.com> wrote: > On Sat, Jun 30, 2012 at 12:18 AM, Aliaksei Lahachou < > aliaksei.lahac...@gmail.com> wrote: > > > Hi! > > > > cobertura:cobertura executes it's own lifecycle: instruments the classes, > > instrumented classes are saved to target/generated-classes/cobertura, and > > executes unit tests. Instrumented classes dump coverage data to > > target/conbertura/cobertura.ser. There are two things to understand: > > > > 1. When cobertura:cobertura is executed, dependencies are not > instrumented. > > You have to have enabled instrumentation, see cobertura:instrument goal. > > This will produce jars with instrumented classes, so be careful not to > > distribute them. > > 2. Each module will write coverage data to it's own > > target/conbertura/cobertura.ser file. I think it's possible to configure > > instrumentation so that all jars write to the same cobertura.ser file, > but > > I don't know whether it's normal, and I never tried that. > > > > > I want to say that there's a cobertura target. Something like > cobertura:aggregate that will combine the results off all the unit tests, > for the module that's being tested. That probably won't be what you want, > but I think it would be a lot closer. This is all from memory though, so > make sure to check it's actually what you want. >