Sure, you can always add it. Sounds like a minor improvement: a small check of the outputDirectories could make the plugin a bit better. -Robert From: [email protected] To: [email protected] Date: Sun, 24 Jul 2011 19:14:44 +0200 Subject: Re: [mojo-user] [COBERTURA] No line coverage reported
You are ofcourse right about the analasys. Your reply made me investigate a little more. Apparently build.outputdirectory and build.testOutputDirectory was the same. I changed the testOutputDirectory and the report was generated correctly =) Should this go into JIRA? The configuration to hafe classes and test-classes generated in the same directory was made long ago when I was a maven newbe.... /Ludwig From: Robert Scholte Sent: Sunday, July 24, 2011 7:08 PM To: [email protected] Subject: RE: [mojo-user] [COBERTURA] No line coverage reported The cobertura-maven-plugin manipulates the classes-directory. AFAIK not the test-classes directory. But you could easily confirm this by moving this test-directory to src/test/java. Might be http://jira.codehaus.org/browse/MCOBERTURA-135, although it doesn't provide much info. I know there are more issues about 0% coverage. Please check jira to see if there's a matching issue. If there's a mini-project to reproduce it, there's a bigger chance that it gets solved. -Robert From: [email protected] To: [email protected] Date: Sun, 24 Jul 2011 18:30:30 +0200 Subject: [mojo-user] [COBERTURA] No line coverage reported Hello! I’m runnning cobertura on my project and a report is generated but it says 0% coverage on all classes. I use the simplest configuration: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.5.1</version> </plugin> When I run mvn cobertura:cobertura, all the tests are run and the final message is: Cobertura: Loaded information on 871 classes. Report time: 23262ms I use maven 3.0.3 The weird thing is that I have another project configrued the exact same way with cobertura and the analasys works fine there. The only differance I can think of is that in the project that works, the tests are located in the “standard” maven folder for test classes. But can that have any impact? /Ludwig
