Hi Howard,

> -----Original Message-----
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: mercredi 26 juillet 2006 17:19
> To: Maven Users List
> Subject: Code coverage with AspectJ?
> 
> Does anyone know how to generate a code coverage report when using
> AspectJ in a project?
> 
> The Clover plugin wants to rewrite and recompile the code, which
> probably won't play well with all things aspect.

I haven't tried it but that should be a good test to add to the clover
plugin test suite. There are various possibilities (clover applied before
aspectj, aspectj applied before clover, using aspectj to instrument sources,
using aspectj to instrument classes).

Let's try to imagine what's going to happen.

Scenario 1: Clover before AspectJ

* clover creates new sources in target/clover/src
* aspectj plugin thinks the project sources are in target/clover/src and
instrument those

I don't see any issue.

Scenario 2: AspectJ before Clover

* AspectJ instrument sources. I haven't used the aspectj plugin for m2 but I
guess it generates classes thus clover is going to simply run but on the
original sources and not on the aspectified. Note that this may or may not
be what you want :-)

In any case I don't any real issue. The scenario 1 sounds the best though.
Simply make sure you execute clover:instrument before the aspectj goal in
your POM.

Any specific issue you can foresee?

Thanks
-Vincent


        

        
                
___________________________________________________________________________ 
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet 
! 
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos 
expériences. 
http://fr.answers.yahoo.com 


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

Reply via email to