|
[
Permalink
| « Hide
]
Kalle Korhonen added a comment - 10/Mar/08 02:36 PM
The documentation for cobertura:cobertura flat out says that it runs the "test" phase prior to executing itself, so I assume this currently cannot be configured. There's of course much more complicated cases that people use the integration-test phase for, but for a lot of projects, it'd be enough if you could configure Cobertura to at least include or run integration-test phase instead. Email thread at http://www.mail-archive.com/users@maven.apache.org/msg78743.html
Someone to work on this ?
Thanks Here's a patch, with new cobertura:cobertura-integration report mojo, which extends existing cobertura report mojo but instead of test phase executes verify phase to have pre-integration-test, integration-test, and post-integration-test phases to execute as well. To use it one should define in pom reporting section something like this:
<plugin> This has been tested only on a trivial example project, and appears to be working well. I'm absolute beginner when it comes to mojo development, so this patch should be treated in that light, just as an suggestion on how this issue could be resolved. The second patch adds one more new cobertura:report-only mojo, which executes only validate phase. Idea is that one should be able to use it together with cobertura:clean cobertura:instrument mojos, for fine-grained control over instrumentation process. I've tested and can confirm that both new Mojo's work well with relatively big multi-module projects.
Can someone else please try too? Is it possible to get at least report-only mojo included in 2.3? With it, and with existing clean and instrument mojos, one can have more complete control over what and when gets instrumented, run tests and then get a coverage report only without rerunning of tests just for report. cobertura-integration mojo is not needed, but can be useful for simpler use cases, where with less configuration one can get coverage data for tests run in integration-test phase along with coverage data for tests in test phase. Hi,
How/where do I go to get the 2.3-SNAPSHOT release? I don't see it on ibiblio, but I'd love to get that version to help test this function. Thanks, Snapshot is deployed
To test the cobertura:report-only mojo patch one can check out latest cobertura-maven-plugin sources from http://svn.codehaus.org/mojo/
Hi Stevo,
I've patched the 2.3 snapshot with your work, and it works on big pom tree (parent/module) configuration. But how did you solved the "classesDirectory " problem when using : surefire+selenium+cobertura when executing test, deployment, it and site into an unique maven execution ? Removing the "readOnly" flag from the war plugin slove partially the problem, but i think there is a much simplier solution to run correctly cobertura .... Can you attach a pom sample and the associated maven command line you use please? Thanks |
|||||||||||||||||||||||||||||||||||||||||||||||