Sounds like the well-known Cobertura 2.1 problem. Try explicitly specifying
version 2.0 of the plugin and see if that fixes it.
----- Original Message -----
From: "drekka" <[EMAIL PROTECTED]>
To: <dev@maven.apache.org>
Sent: Wednesday, February 07, 2007 1:13 AM
Subject: Lifecycle issues with Cobertura plugin and custom plugin
Hi guys,
I've been trying to nut this out for a couple of days now and need your
help. A few weeks ago I wrote a Junit4 plugin which works perfectly in the
test phase. It doesn't fork or anything fancy, just gets on with the job.
It's header contains the following annotations:
* @requiresDependencyResolution test
* @goal runJunit4Tests
* @phase test
However when I added the Cobertrua plugin to the mix, the cobertura report
keeps reporting 0% coverage. The logs indicate that my plugin is working
and
using the generated-classes/cobertura/ directory. It also indicates that
the
classes are being instrumented correctly. yet looking at the .ser file
cobertura uses it would appear that either the
instrumented classes are not logging correctly or not being used as
nothing
is appended to the file.
This lead me to conclude that there is something wrong with the way I've
setup the plugin within maven. From reading the source of the cobertura
plugin it appears that the plugin forks a new process to run the test
phase
again. At this point I'm not sure what happens as the maven doco is really
hard to follow and leave me with more questions than answers. The logs
indicate that the test are run twice. Once before instrumenting and once
after. I've looked for any direct connection between the surefire and
cobertura plugins but cannot see anything.
Any ideas guys ?
ciao
Derek
--
View this message in context:
http://www.nabble.com/Lifecycle-issues-with-Cobertura-plugin-and-custom-plugin-tf3185205s177.html#a8840433
Sent from the Maven Developers mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]