So in a simplistic attempt to get this to work, I looked at the Clover plugin
to see what it did.  I tried changing the execute phase of
CoberturaCheckMojo and CoberturaReportMojo to "verify", like the Clover
mojos of the same function.  This fails in the package phase:

[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin. Reason:
ERROR: Cannot override read-only parameter: classesDirectory in goal:
war:war

Looking at the Clover plugin a little more, it looks like it manages its
separate lifecycle a little differently and only the instrument mojo kicks
off the separate lifecycle.  And in fact, the instrument mojo is a shell,
and there is an internal instrument mojo that does the real work.

Do you think that the Cobertura mojo can be incrementally moved to this
model?  What else were you intending?

I would love to get this working, as having code coverage (with checking) is
that last step in converting our main project from Ant to Maven.  So let me
know if you need help!

          -- Josh



Jeff MAURY wrote:
> 
> Richard,
> 
> I have the same problem and I think this is not feasible with the current
> design of the Cobertura Maven2 plugin design as it is today. It does only
> address the test phase and not the integration-test phase. I plan to work
> on
> another Cobertura plugin (inspired from the philosophy of the Clover
> plugin)
> that address this issue.
> 
> Jeff
> 
> 
> On Dec 13, 2007 3:29 PM, Brewster, Richard <[EMAIL PROTECTED]>
> wrote:
> 
>> I want to produce a coverage report for the integration test phase of a
>> web application (war packaging).  My integration tests are run by the
>> Cargo maven plugin launching JBoss 4.0.5.  I've been using the 2.0
>> version of the cobertura-maven-plugin (and will try the upgrade to 2.2).
>> I have a modular project with core and web modules.  I get the expected
>> coverage reports for my core module, but zero coverage for the web
>> module.  The instrumented classes are not packaged into the war, for
>> one.  According to the Cobertura FAQ, this sort of coverage testing can
>> be done.
>>
>> http://cobertura.sourceforge.net/faq.html
>>
>> Has anyone done this?  Any advice would be appreciated!
>>
>> Also, it would be great if integration test coverage could be documented
>> here, too:
>>
>> http://mojo.codehaus.org/cobertura-maven-plugin/usage.html
>>
>> Thanks,
>>
>> Richard Brewster
>> Senior Associate
>> Perrin Quarles Associates
>> [EMAIL PROTECTED]
>> (434) 817-2640
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> La mélancolie c'est communiste
> Tout le monde y a droit de temps en temps
> La mélancolie n'est pas capitaliste
> C'est même gratuit pour les perdants
> La mélancolie c'est pacifiste
> On ne lui rentre jamais dedans
> La mélancolie oh tu sais ça existe
> Elle se prend même avec des gants
> La mélancolie c'est pour les syndicalistes
> Il faut juste sa carte de permanent
> 
> Miossec (2006)
> 
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-ANN--cobertura-maven-plugin-2.2-tp14310731s177p14826260.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to