You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2006/07/26 17:18:31 UTC

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.

Is there a Maven2 plugin for emma or cobetura?

-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Just tried cobetura plugin but it's giving me 0% coverage:

mvn cobertura:cobertura had some hickups on my aspects (NPEs).

The tests all run and pass (there would be failures if the aspects
weren't in effect), but the output report is all 0% coverage.

On 7/26/06, Raphaël Piéroni <ra...@gmail.com> wrote:
> Hi
>
> 2006/7/26, Howard Lewis Ship <hl...@gmail.com>:
> >
> > Does anyone know how to generate a code coverage report when using
> > AspectJ in a project?
>
>
> Sorry, I dunno
>
>
> The Clover plugin wants to rewrite and recompile the code, which
> > probably won't play well with all things aspect.
> >
> > Is there a Maven2 plugin for emma or cobetura?
>
>
> Yep at least for cobertura at mojo.codehaus.org
>
>
>
> Raphaël
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Raphaël Piéroni <ra...@gmail.com>.
Hi

2006/7/26, Howard Lewis Ship <hl...@gmail.com>:
>
> Does anyone know how to generate a code coverage report when using
> AspectJ in a project?


Sorry, I dunno


The Clover plugin wants to rewrite and recompile the code, which
> probably won't play well with all things aspect.
>
> Is there a Maven2 plugin for emma or cobetura?


Yep at least for cobertura at mojo.codehaus.org



Raphaël

Re: Code coverage with AspectJ?

Posted by Vincent Massol <vi...@massol.net>.
On Mar 10, 2007, at 10:44 AM, Kaare Nilsen wrote:

> AFAIK this is still valid :
> http://www.cenqua.com/forums/thread.jspa?messageID=13711&#13711

But this not what I said...

I explicitely mentioned that you have to run them in the right  
order... See my message below :)

-Vincent

> On 10/03/07, Vincent Massol <vi...@massol.net> wrote:
>>
>> On Mar 9, 2007, at 11:58 PM, Kaare Nilsen wrote:
>>
>> > On 09/03/07, Vincent Massol <vi...@massol.net> wrote:
>> >>
>> >> On Mar 9, 2007, at 2:16 PM, Steve Shucker wrote:
>> >>
>> >> > I don't think AspectJ and Clover are compatible.
>> >>
>> >> Hmmm they might be if you run them in the right order. Run Clover
>> >> first on sources and then AspectJ on either generated sources  
>> or on
>> >> the JAR. This should work I think, although I don't recall having
>> >> tried this.
>> >
>> > Don't think it is possible even if you run aspectJ on the generated
>> > source. All the references I am able to find on the net says  
>> it's not
>> > possible, and this is also my own experience
>>
>> Can you explain why it's not possible in a few words?
>>
>> Thanks
>> -Vincent
>>
>> >> > We use Cobertura instead.  The coverage report isn't as nice,  
>> but
>> >> > it is functional.  For maven1, there's also an emma plugin.
>> >> >
>> >> > -Steve
>> >> >
>> >> > Michael Waluk wrote:
>> >> >> Hi,
>> >> >>
>> >> >> I can't find much else regarding using AspectJ with Clover.   
>> Were
>> >> >> you able
>> >> >> to get it working with an example AspectJ project?
>> >> >>
>> >> >> Has anyone been successful with this yet?  We have it to the  
>> point
>> >> >> where we
>> >> >> are getting 0% coverage for some reason, but I haven't spent  
>> much
>> >> >> time on
>> >> >> it.  I'd bother if there were some success stories out there.
>> >> >>
>> >> >> Thanks for any info,
>> >> >> Michael
>> >> >>
>> >> >>
>> >> >> On 7/26/06, Vincent Massol <vi...@massol.net> wrote:
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> > -----Original Message-----
>> >> >>> > From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
>> >> >>> > Sent: mercredi 26 juillet 2006 19:53
>> >> >>> > To: Maven Users List
>> >> >>> > Subject: Re: Code coverage with AspectJ?
>> >> >>> >
>> >> >>> > On 26/07/06, Jason Chaffee <ja...@tvworks.com>  
>> wrote:
>> >> >>> > > I use cobetura and load-time weaving during unit-tests  
>> to do
>> >> >>> this.  To
>> >> >>> > use load-time weaving you must fork at least once and
>> >> provide the
>> >> >>> > javaagent as an <argline>
>> >> >>> > >
>> >> >>> > > -----Original Message-----
>> >> >>> > > From: Vincent Massol [mailto:vincent@massol.net]
>> >> >>> > > Sent: Wednesday, July 26, 2006 8:42 AM
>> >> >>> > > To: 'Maven Users List'
>> >> >>> > > Subject: RE: Code coverage with AspectJ?
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> > > > -----Original Message-----
>> >> >>> > > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On
>> >> >>> Behalf Of
>> >> >>> > Carlos
>> >> >>> > > > Sanchez
>> >> >>> > > > Sent: mercredi 26 juillet 2006 17:29
>> >> >>> > > > To: Maven Users List
>> >> >>> > > > Subject: Re: Code coverage with AspectJ?
>> >> >>> > > >
>> >> >>> > > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
>> >> >>> > > > > 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.
>> >> >>> > > >
>> >> >>> > > > seems not possible:
>> >> >>> > > >
>> >> >>> > > > [quote]
>> >> >>> > > > Indeed running AspectJ AFTER Clover works. I'm using  
>> that
>> >> >>> for now,
>> >> >>> so
>> >> >>> > > > that I at least have SOME Clover data.
>> >> >>> > > > The thing I would like though, is to run AspectJ BEFORE
>> >> >>> Clover runs,
>> >> >>> > > > so I also have Clover data on the AspectJ-sources!
>> >> >>> > > > As I see it, there are 2 ways to do this:
>> >> >>> > > >
>> >> >>> > > > 1) AspectJ weaves his new files and writes them out as
>> >> >>> sources so
>> >> >>> > > > Clover can work on them. The problem here will be that
>> >> >>> > > > Clover can't show the reports on AspectJ-files, but  
>> rather
>> >> >>> on the
>> >> >>> > > > weaved files.
>> >> >>> > >
>> >> >>> > > Why not? If you point the Clover plugin to the generated
>> >> >>> sources it
>> >> >>> > should
>> >> >>> > > work fine, no? I guess I'd need to try it.
>> >> >>> > >
>> >> >>> > > > It's a solution, but what would be really great
>> >> >>> > > > is:
>> >> >>> > > > 2) Clover examines the AspectJ sources and adds his
>> >> >>> statements to
>> >> >>> > > > those files. Then AspectJ can do his normal thing and
>> >> >>> > > > Clover's reports should show the coverage in the correct
>> >> >>> files and
>> >> >>> > > > calculate the EXACT amount of times the statements have
>> >> >>> > > > been called.
>> >> >>> > >
>> >> >>> > > I don't understand this solution. Is clover running before
>> >> >>> aspectj in
>> >> >>> > this
>> >> >>> > > case? If so then we're back to the first solution  
>> above, no?
>> >> >>> > >
>> >> >>> > > > Unfortunately I already heard from Cenqua that atm  
>> Clover
>> >> >>> doesn't
>> >> >>> know
>> >> >>> > > > how to handle AspectJ sources... So I think that the
>> >> >>> > > > plugin will have the same problems...
>> >> >>> > >
>> >> >>> > > Ah maybe there's some issue. If someone could show me a  
>> very
>> >> >>> simple
>> >> >>> > aspectj
>> >> >>> > > project (one simple class, one aspect, one test and a POM
>> >> >>> using the
>> >> >>> > aspectj
>> >> >>> > > plugin) then I could add it to the clover plugin's test  
>> suite
>> >> >>> and try
>> >> >>> it
>> >> >>> > > out.
>> >> >>> >
>> >> >>> > You will find some here :
>> >> >>> > http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
>> >> >>> > plugin/src/test/projects/
>> >> >>> >
>> >> >>> > But as Carlos mentioned. Clover and aspectJ is not really
>> >> >>> compatible
>> >> >>>
>> >> >>> Thanks for the link. Could you elaborate just a little more  
>> about
>> >> >>> the
>> >> >>> incompatibility before I spend too much time looking into  
>> it? :-)
>> >> >>>
>> >> >>> Thanks
>> >> >>> -Vincent
>> >> >>>
>> >> >>> > > > > Is there a Maven2 plugin for emma or cobetura?
>> >> >>> > > >
>> >> >>> > > > cobertura, and it plays well with aspectj afaik, you  
>> have
>> >> >>> to make
>> >> >>> sure
>> >> >>> > > > the aspectj plugin doesn't recompile from sources for  
>> what
>> >> >>> I read in
>> >> >>> > > > the cobertura mailing list
>> >> >>> > > >
>> >> >>> > > > >
>> >> >>> > > > > --
>> >> >>> > > > > Howard M. Lewis Ship
>> >> >>> > > > > TWD Consulting, Inc.
>> >> >>> > > > > Independent J2EE / Open-Source Java Consultant
>> >> >>> > > > > Creator and PMC Chair, Apache Tapestry
>> >> >>> > > > > Creator, Apache HiveMind
>> >> >>> > > > >
>> >> >>> > > > > Professional Tapestry training, mentoring, support
>> >> >>> > > > > and project work.  http://howardlewisship.com
>> >> >>> > > > >
>> >> >>> > > > >
>> >> >>>
>> >>  
>> --------------------------------------------------------------------
>> >> >>> > -
>> >> >>> > > > > To unsubscribe, e-mail: users-
>> >> unsubscribe@maven.apache.org
>> >> >>> > > > > For additional commands, e-mail: users-
>> >> help@maven.apache.org
>> >> >>> > > > >
>> >> >>> > > > >
>> >> >>> > > >
>> >> >>> > > >
>> >> >>> > > > --
>> >> >>> > > > I could give you my word as a Spaniard.
>> >> >>> > > > No good. I've known too many Spaniards.
>> >> >>> > > >                              -- The Princess Bride
>> >> >>> > > >
>> >> >>> > > >
>> >> >>>
>> >>  
>> --------------------------------------------------------------------
>> >> >>> -
>> >> >>> > > > To unsubscribe, e-mail: users- 
>> unsubscribe@maven.apache.org
>> >> >>> > > > For additional commands, e-mail: users-
>> >> help@maven.apache.org
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> >
>> >> >>>
>> >>  
>> ____________________________________________________________________
>> >> >>> ______
>> >> >>> > _
>> >> >>> > > 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: users-unsubscribe@maven.apache.org
>> >> >>> > > For additional commands, e-mail: users- 
>> help@maven.apache.org
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>>
>> >>  
>> --------------------------------------------------------------------
>> >> >>> -
>> >> >>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> >>> > > For additional commands, e-mail: users- 
>> help@maven.apache.org
>> >> >>> > >
>> >> >>> > >
>> >> >>> >
>> >> >>> >
>> >> >>>
>> >>  
>> --------------------------------------------------------------------
>> >> >>> -
>> >> >>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> >>> > For additional commands, e-mail: users-help@maven.apache.org
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >>  
>> ____________________________________________________________________
>> >> >>> _______
>> >> >>> 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: users-unsubscribe@maven.apache.org
>> >> >>> For additional commands, e-mail: users-help@maven.apache.org
>> >> >>>
>> >> >>>
>> >> >>
>> >> >
>> >> >
>> >>  
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> > For additional commands, e-mail: users-help@maven.apache.org
>> >> >
>> >>
>> >>
>> >>  
>> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> For additional commands, e-mail: users-help@maven.apache.org
>> >>
>> >>
>> >
>> >  
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Kaare Nilsen <ka...@gmail.com>.
AFAIK this is still valid :
http://www.cenqua.com/forums/thread.jspa?messageID=13711&#13711



On 10/03/07, Vincent Massol <vi...@massol.net> wrote:
>
> On Mar 9, 2007, at 11:58 PM, Kaare Nilsen wrote:
>
> > On 09/03/07, Vincent Massol <vi...@massol.net> wrote:
> >>
> >> On Mar 9, 2007, at 2:16 PM, Steve Shucker wrote:
> >>
> >> > I don't think AspectJ and Clover are compatible.
> >>
> >> Hmmm they might be if you run them in the right order. Run Clover
> >> first on sources and then AspectJ on either generated sources or on
> >> the JAR. This should work I think, although I don't recall having
> >> tried this.
> >
> > Don't think it is possible even if you run aspectJ on the generated
> > source. All the references I am able to find on the net says it's not
> > possible, and this is also my own experience
>
> Can you explain why it's not possible in a few words?
>
> Thanks
> -Vincent
>
> >> > We use Cobertura instead.  The coverage report isn't as nice, but
> >> > it is functional.  For maven1, there's also an emma plugin.
> >> >
> >> > -Steve
> >> >
> >> > Michael Waluk wrote:
> >> >> Hi,
> >> >>
> >> >> I can't find much else regarding using AspectJ with Clover.  Were
> >> >> you able
> >> >> to get it working with an example AspectJ project?
> >> >>
> >> >> Has anyone been successful with this yet?  We have it to the point
> >> >> where we
> >> >> are getting 0% coverage for some reason, but I haven't spent much
> >> >> time on
> >> >> it.  I'd bother if there were some success stories out there.
> >> >>
> >> >> Thanks for any info,
> >> >> Michael
> >> >>
> >> >>
> >> >> On 7/26/06, Vincent Massol <vi...@massol.net> wrote:
> >> >>>
> >> >>>
> >> >>>
> >> >>> > -----Original Message-----
> >> >>> > From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
> >> >>> > Sent: mercredi 26 juillet 2006 19:53
> >> >>> > To: Maven Users List
> >> >>> > Subject: Re: Code coverage with AspectJ?
> >> >>> >
> >> >>> > On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
> >> >>> > > I use cobetura and load-time weaving during unit-tests to do
> >> >>> this.  To
> >> >>> > use load-time weaving you must fork at least once and
> >> provide the
> >> >>> > javaagent as an <argline>
> >> >>> > >
> >> >>> > > -----Original Message-----
> >> >>> > > From: Vincent Massol [mailto:vincent@massol.net]
> >> >>> > > Sent: Wednesday, July 26, 2006 8:42 AM
> >> >>> > > To: 'Maven Users List'
> >> >>> > > Subject: RE: Code coverage with AspectJ?
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > > > -----Original Message-----
> >> >>> > > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On
> >> >>> Behalf Of
> >> >>> > Carlos
> >> >>> > > > Sanchez
> >> >>> > > > Sent: mercredi 26 juillet 2006 17:29
> >> >>> > > > To: Maven Users List
> >> >>> > > > Subject: Re: Code coverage with AspectJ?
> >> >>> > > >
> >> >>> > > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> >> >>> > > > > 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.
> >> >>> > > >
> >> >>> > > > seems not possible:
> >> >>> > > >
> >> >>> > > > [quote]
> >> >>> > > > Indeed running AspectJ AFTER Clover works. I'm using that
> >> >>> for now,
> >> >>> so
> >> >>> > > > that I at least have SOME Clover data.
> >> >>> > > > The thing I would like though, is to run AspectJ BEFORE
> >> >>> Clover runs,
> >> >>> > > > so I also have Clover data on the AspectJ-sources!
> >> >>> > > > As I see it, there are 2 ways to do this:
> >> >>> > > >
> >> >>> > > > 1) AspectJ weaves his new files and writes them out as
> >> >>> sources so
> >> >>> > > > Clover can work on them. The problem here will be that
> >> >>> > > > Clover can't show the reports on AspectJ-files, but rather
> >> >>> on the
> >> >>> > > > weaved files.
> >> >>> > >
> >> >>> > > Why not? If you point the Clover plugin to the generated
> >> >>> sources it
> >> >>> > should
> >> >>> > > work fine, no? I guess I'd need to try it.
> >> >>> > >
> >> >>> > > > It's a solution, but what would be really great
> >> >>> > > > is:
> >> >>> > > > 2) Clover examines the AspectJ sources and adds his
> >> >>> statements to
> >> >>> > > > those files. Then AspectJ can do his normal thing and
> >> >>> > > > Clover's reports should show the coverage in the correct
> >> >>> files and
> >> >>> > > > calculate the EXACT amount of times the statements have
> >> >>> > > > been called.
> >> >>> > >
> >> >>> > > I don't understand this solution. Is clover running before
> >> >>> aspectj in
> >> >>> > this
> >> >>> > > case? If so then we're back to the first solution above, no?
> >> >>> > >
> >> >>> > > > Unfortunately I already heard from Cenqua that atm Clover
> >> >>> doesn't
> >> >>> know
> >> >>> > > > how to handle AspectJ sources... So I think that the
> >> >>> > > > plugin will have the same problems...
> >> >>> > >
> >> >>> > > Ah maybe there's some issue. If someone could show me a very
> >> >>> simple
> >> >>> > aspectj
> >> >>> > > project (one simple class, one aspect, one test and a POM
> >> >>> using the
> >> >>> > aspectj
> >> >>> > > plugin) then I could add it to the clover plugin's test suite
> >> >>> and try
> >> >>> it
> >> >>> > > out.
> >> >>> >
> >> >>> > You will find some here :
> >> >>> > http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
> >> >>> > plugin/src/test/projects/
> >> >>> >
> >> >>> > But as Carlos mentioned. Clover and aspectJ is not really
> >> >>> compatible
> >> >>>
> >> >>> Thanks for the link. Could you elaborate just a little more about
> >> >>> the
> >> >>> incompatibility before I spend too much time looking into it? :-)
> >> >>>
> >> >>> Thanks
> >> >>> -Vincent
> >> >>>
> >> >>> > > > > Is there a Maven2 plugin for emma or cobetura?
> >> >>> > > >
> >> >>> > > > cobertura, and it plays well with aspectj afaik, you have
> >> >>> to make
> >> >>> sure
> >> >>> > > > the aspectj plugin doesn't recompile from sources for what
> >> >>> I read in
> >> >>> > > > the cobertura mailing list
> >> >>> > > >
> >> >>> > > > >
> >> >>> > > > > --
> >> >>> > > > > Howard M. Lewis Ship
> >> >>> > > > > TWD Consulting, Inc.
> >> >>> > > > > Independent J2EE / Open-Source Java Consultant
> >> >>> > > > > Creator and PMC Chair, Apache Tapestry
> >> >>> > > > > Creator, Apache HiveMind
> >> >>> > > > >
> >> >>> > > > > Professional Tapestry training, mentoring, support
> >> >>> > > > > and project work.  http://howardlewisship.com
> >> >>> > > > >
> >> >>> > > > >
> >> >>>
> >> --------------------------------------------------------------------
> >> >>> > -
> >> >>> > > > > To unsubscribe, e-mail: users-
> >> unsubscribe@maven.apache.org
> >> >>> > > > > For additional commands, e-mail: users-
> >> help@maven.apache.org
> >> >>> > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > > >
> >> >>> > > > --
> >> >>> > > > I could give you my word as a Spaniard.
> >> >>> > > > No good. I've known too many Spaniards.
> >> >>> > > >                              -- The Princess Bride
> >> >>> > > >
> >> >>> > > >
> >> >>>
> >> --------------------------------------------------------------------
> >> >>> -
> >> >>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> >>> > > > For additional commands, e-mail: users-
> >> help@maven.apache.org
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> >
> >> >>>
> >> ____________________________________________________________________
> >> >>> ______
> >> >>> > _
> >> >>> > > 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: users-unsubscribe@maven.apache.org
> >> >>> > > For additional commands, e-mail: users-help@maven.apache.org
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>>
> >> --------------------------------------------------------------------
> >> >>> -
> >> >>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> >>> > > For additional commands, e-mail: users-help@maven.apache.org
> >> >>> > >
> >> >>> > >
> >> >>> >
> >> >>> >
> >> >>>
> >> --------------------------------------------------------------------
> >> >>> -
> >> >>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> >>> > For additional commands, e-mail: users-help@maven.apache.org
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> ____________________________________________________________________
> >> >>> _______
> >> >>> 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: users-unsubscribe@maven.apache.org
> >> >>> For additional commands, e-mail: users-help@maven.apache.org
> >> >>>
> >> >>>
> >> >>
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > For additional commands, e-mail: users-help@maven.apache.org
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Vincent Massol <vi...@massol.net>.
On Mar 9, 2007, at 11:58 PM, Kaare Nilsen wrote:

> On 09/03/07, Vincent Massol <vi...@massol.net> wrote:
>>
>> On Mar 9, 2007, at 2:16 PM, Steve Shucker wrote:
>>
>> > I don't think AspectJ and Clover are compatible.
>>
>> Hmmm they might be if you run them in the right order. Run Clover
>> first on sources and then AspectJ on either generated sources or on
>> the JAR. This should work I think, although I don't recall having
>> tried this.
>
> Don't think it is possible even if you run aspectJ on the generated
> source. All the references I am able to find on the net says it's not
> possible, and this is also my own experience

Can you explain why it's not possible in a few words?

Thanks
-Vincent

>> > We use Cobertura instead.  The coverage report isn't as nice, but
>> > it is functional.  For maven1, there's also an emma plugin.
>> >
>> > -Steve
>> >
>> > Michael Waluk wrote:
>> >> Hi,
>> >>
>> >> I can't find much else regarding using AspectJ with Clover.  Were
>> >> you able
>> >> to get it working with an example AspectJ project?
>> >>
>> >> Has anyone been successful with this yet?  We have it to the point
>> >> where we
>> >> are getting 0% coverage for some reason, but I haven't spent much
>> >> time on
>> >> it.  I'd bother if there were some success stories out there.
>> >>
>> >> Thanks for any info,
>> >> Michael
>> >>
>> >>
>> >> On 7/26/06, Vincent Massol <vi...@massol.net> wrote:
>> >>>
>> >>>
>> >>>
>> >>> > -----Original Message-----
>> >>> > From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
>> >>> > Sent: mercredi 26 juillet 2006 19:53
>> >>> > To: Maven Users List
>> >>> > Subject: Re: Code coverage with AspectJ?
>> >>> >
>> >>> > On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
>> >>> > > I use cobetura and load-time weaving during unit-tests to do
>> >>> this.  To
>> >>> > use load-time weaving you must fork at least once and  
>> provide the
>> >>> > javaagent as an <argline>
>> >>> > >
>> >>> > > -----Original Message-----
>> >>> > > From: Vincent Massol [mailto:vincent@massol.net]
>> >>> > > Sent: Wednesday, July 26, 2006 8:42 AM
>> >>> > > To: 'Maven Users List'
>> >>> > > Subject: RE: Code coverage with AspectJ?
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > > > -----Original Message-----
>> >>> > > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On
>> >>> Behalf Of
>> >>> > Carlos
>> >>> > > > Sanchez
>> >>> > > > Sent: mercredi 26 juillet 2006 17:29
>> >>> > > > To: Maven Users List
>> >>> > > > Subject: Re: Code coverage with AspectJ?
>> >>> > > >
>> >>> > > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
>> >>> > > > > 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.
>> >>> > > >
>> >>> > > > seems not possible:
>> >>> > > >
>> >>> > > > [quote]
>> >>> > > > Indeed running AspectJ AFTER Clover works. I'm using that
>> >>> for now,
>> >>> so
>> >>> > > > that I at least have SOME Clover data.
>> >>> > > > The thing I would like though, is to run AspectJ BEFORE
>> >>> Clover runs,
>> >>> > > > so I also have Clover data on the AspectJ-sources!
>> >>> > > > As I see it, there are 2 ways to do this:
>> >>> > > >
>> >>> > > > 1) AspectJ weaves his new files and writes them out as
>> >>> sources so
>> >>> > > > Clover can work on them. The problem here will be that
>> >>> > > > Clover can't show the reports on AspectJ-files, but rather
>> >>> on the
>> >>> > > > weaved files.
>> >>> > >
>> >>> > > Why not? If you point the Clover plugin to the generated
>> >>> sources it
>> >>> > should
>> >>> > > work fine, no? I guess I'd need to try it.
>> >>> > >
>> >>> > > > It's a solution, but what would be really great
>> >>> > > > is:
>> >>> > > > 2) Clover examines the AspectJ sources and adds his
>> >>> statements to
>> >>> > > > those files. Then AspectJ can do his normal thing and
>> >>> > > > Clover's reports should show the coverage in the correct
>> >>> files and
>> >>> > > > calculate the EXACT amount of times the statements have
>> >>> > > > been called.
>> >>> > >
>> >>> > > I don't understand this solution. Is clover running before
>> >>> aspectj in
>> >>> > this
>> >>> > > case? If so then we're back to the first solution above, no?
>> >>> > >
>> >>> > > > Unfortunately I already heard from Cenqua that atm Clover
>> >>> doesn't
>> >>> know
>> >>> > > > how to handle AspectJ sources... So I think that the
>> >>> > > > plugin will have the same problems...
>> >>> > >
>> >>> > > Ah maybe there's some issue. If someone could show me a very
>> >>> simple
>> >>> > aspectj
>> >>> > > project (one simple class, one aspect, one test and a POM
>> >>> using the
>> >>> > aspectj
>> >>> > > plugin) then I could add it to the clover plugin's test suite
>> >>> and try
>> >>> it
>> >>> > > out.
>> >>> >
>> >>> > You will find some here :
>> >>> > http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
>> >>> > plugin/src/test/projects/
>> >>> >
>> >>> > But as Carlos mentioned. Clover and aspectJ is not really
>> >>> compatible
>> >>>
>> >>> Thanks for the link. Could you elaborate just a little more about
>> >>> the
>> >>> incompatibility before I spend too much time looking into it? :-)
>> >>>
>> >>> Thanks
>> >>> -Vincent
>> >>>
>> >>> > > > > Is there a Maven2 plugin for emma or cobetura?
>> >>> > > >
>> >>> > > > cobertura, and it plays well with aspectj afaik, you have
>> >>> to make
>> >>> sure
>> >>> > > > the aspectj plugin doesn't recompile from sources for what
>> >>> I read in
>> >>> > > > the cobertura mailing list
>> >>> > > >
>> >>> > > > >
>> >>> > > > > --
>> >>> > > > > Howard M. Lewis Ship
>> >>> > > > > TWD Consulting, Inc.
>> >>> > > > > Independent J2EE / Open-Source Java Consultant
>> >>> > > > > Creator and PMC Chair, Apache Tapestry
>> >>> > > > > Creator, Apache HiveMind
>> >>> > > > >
>> >>> > > > > Professional Tapestry training, mentoring, support
>> >>> > > > > and project work.  http://howardlewisship.com
>> >>> > > > >
>> >>> > > > >
>> >>>  
>> --------------------------------------------------------------------
>> >>> > -
>> >>> > > > > To unsubscribe, e-mail: users- 
>> unsubscribe@maven.apache.org
>> >>> > > > > For additional commands, e-mail: users- 
>> help@maven.apache.org
>> >>> > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > > >
>> >>> > > > --
>> >>> > > > I could give you my word as a Spaniard.
>> >>> > > > No good. I've known too many Spaniards.
>> >>> > > >                              -- The Princess Bride
>> >>> > > >
>> >>> > > >
>> >>>  
>> --------------------------------------------------------------------
>> >>> -
>> >>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >>> > > > For additional commands, e-mail: users- 
>> help@maven.apache.org
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> >
>> >>>  
>> ____________________________________________________________________
>> >>> ______
>> >>> > _
>> >>> > > 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: users-unsubscribe@maven.apache.org
>> >>> > > For additional commands, e-mail: users-help@maven.apache.org
>> >>> > >
>> >>> > >
>> >>> > >
>> >>>  
>> --------------------------------------------------------------------
>> >>> -
>> >>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >>> > > For additional commands, e-mail: users-help@maven.apache.org
>> >>> > >
>> >>> > >
>> >>> >
>> >>> >
>> >>>  
>> --------------------------------------------------------------------
>> >>> -
>> >>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >>> > For additional commands, e-mail: users-help@maven.apache.org
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>  
>> ____________________________________________________________________
>> >>> _______
>> >>> 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: users-unsubscribe@maven.apache.org
>> >>> For additional commands, e-mail: users-help@maven.apache.org
>> >>>
>> >>>
>> >>
>> >
>> >  
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Kaare Nilsen <ka...@gmail.com>.
On 09/03/07, Vincent Massol <vi...@massol.net> wrote:
>
> On Mar 9, 2007, at 2:16 PM, Steve Shucker wrote:
>
> > I don't think AspectJ and Clover are compatible.
>
> Hmmm they might be if you run them in the right order. Run Clover
> first on sources and then AspectJ on either generated sources or on
> the JAR. This should work I think, although I don't recall having
> tried this.

Don't think it is possible even if you run aspectJ on the generated
source. All the references I am able to find on the net says it's not
possible, and this is also my own experience

>
> -Vincent
>
>
> > We use Cobertura instead.  The coverage report isn't as nice, but
> > it is functional.  For maven1, there's also an emma plugin.
> >
> > -Steve
> >
> > Michael Waluk wrote:
> >> Hi,
> >>
> >> I can't find much else regarding using AspectJ with Clover.  Were
> >> you able
> >> to get it working with an example AspectJ project?
> >>
> >> Has anyone been successful with this yet?  We have it to the point
> >> where we
> >> are getting 0% coverage for some reason, but I haven't spent much
> >> time on
> >> it.  I'd bother if there were some success stories out there.
> >>
> >> Thanks for any info,
> >> Michael
> >>
> >>
> >> On 7/26/06, Vincent Massol <vi...@massol.net> wrote:
> >>>
> >>>
> >>>
> >>> > -----Original Message-----
> >>> > From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
> >>> > Sent: mercredi 26 juillet 2006 19:53
> >>> > To: Maven Users List
> >>> > Subject: Re: Code coverage with AspectJ?
> >>> >
> >>> > On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
> >>> > > I use cobetura and load-time weaving during unit-tests to do
> >>> this.  To
> >>> > use load-time weaving you must fork at least once and provide the
> >>> > javaagent as an <argline>
> >>> > >
> >>> > > -----Original Message-----
> >>> > > From: Vincent Massol [mailto:vincent@massol.net]
> >>> > > Sent: Wednesday, July 26, 2006 8:42 AM
> >>> > > To: 'Maven Users List'
> >>> > > Subject: RE: Code coverage with AspectJ?
> >>> > >
> >>> > >
> >>> > >
> >>> > > > -----Original Message-----
> >>> > > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On
> >>> Behalf Of
> >>> > Carlos
> >>> > > > Sanchez
> >>> > > > Sent: mercredi 26 juillet 2006 17:29
> >>> > > > To: Maven Users List
> >>> > > > Subject: Re: Code coverage with AspectJ?
> >>> > > >
> >>> > > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> >>> > > > > 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.
> >>> > > >
> >>> > > > seems not possible:
> >>> > > >
> >>> > > > [quote]
> >>> > > > Indeed running AspectJ AFTER Clover works. I'm using that
> >>> for now,
> >>> so
> >>> > > > that I at least have SOME Clover data.
> >>> > > > The thing I would like though, is to run AspectJ BEFORE
> >>> Clover runs,
> >>> > > > so I also have Clover data on the AspectJ-sources!
> >>> > > > As I see it, there are 2 ways to do this:
> >>> > > >
> >>> > > > 1) AspectJ weaves his new files and writes them out as
> >>> sources so
> >>> > > > Clover can work on them. The problem here will be that
> >>> > > > Clover can't show the reports on AspectJ-files, but rather
> >>> on the
> >>> > > > weaved files.
> >>> > >
> >>> > > Why not? If you point the Clover plugin to the generated
> >>> sources it
> >>> > should
> >>> > > work fine, no? I guess I'd need to try it.
> >>> > >
> >>> > > > It's a solution, but what would be really great
> >>> > > > is:
> >>> > > > 2) Clover examines the AspectJ sources and adds his
> >>> statements to
> >>> > > > those files. Then AspectJ can do his normal thing and
> >>> > > > Clover's reports should show the coverage in the correct
> >>> files and
> >>> > > > calculate the EXACT amount of times the statements have
> >>> > > > been called.
> >>> > >
> >>> > > I don't understand this solution. Is clover running before
> >>> aspectj in
> >>> > this
> >>> > > case? If so then we're back to the first solution above, no?
> >>> > >
> >>> > > > Unfortunately I already heard from Cenqua that atm Clover
> >>> doesn't
> >>> know
> >>> > > > how to handle AspectJ sources... So I think that the
> >>> > > > plugin will have the same problems...
> >>> > >
> >>> > > Ah maybe there's some issue. If someone could show me a very
> >>> simple
> >>> > aspectj
> >>> > > project (one simple class, one aspect, one test and a POM
> >>> using the
> >>> > aspectj
> >>> > > plugin) then I could add it to the clover plugin's test suite
> >>> and try
> >>> it
> >>> > > out.
> >>> >
> >>> > You will find some here :
> >>> > http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
> >>> > plugin/src/test/projects/
> >>> >
> >>> > But as Carlos mentioned. Clover and aspectJ is not really
> >>> compatible
> >>>
> >>> Thanks for the link. Could you elaborate just a little more about
> >>> the
> >>> incompatibility before I spend too much time looking into it? :-)
> >>>
> >>> Thanks
> >>> -Vincent
> >>>
> >>> > > > > Is there a Maven2 plugin for emma or cobetura?
> >>> > > >
> >>> > > > cobertura, and it plays well with aspectj afaik, you have
> >>> to make
> >>> sure
> >>> > > > the aspectj plugin doesn't recompile from sources for what
> >>> I read in
> >>> > > > the cobertura mailing list
> >>> > > >
> >>> > > > >
> >>> > > > > --
> >>> > > > > Howard M. Lewis Ship
> >>> > > > > TWD Consulting, Inc.
> >>> > > > > Independent J2EE / Open-Source Java Consultant
> >>> > > > > Creator and PMC Chair, Apache Tapestry
> >>> > > > > Creator, Apache HiveMind
> >>> > > > >
> >>> > > > > Professional Tapestry training, mentoring, support
> >>> > > > > and project work.  http://howardlewisship.com
> >>> > > > >
> >>> > > > >
> >>> --------------------------------------------------------------------
> >>> > -
> >>> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> > > > > For additional commands, e-mail: users-help@maven.apache.org
> >>> > > > >
> >>> > > > >
> >>> > > >
> >>> > > >
> >>> > > > --
> >>> > > > I could give you my word as a Spaniard.
> >>> > > > No good. I've known too many Spaniards.
> >>> > > >                              -- The Princess Bride
> >>> > > >
> >>> > > >
> >>> --------------------------------------------------------------------
> >>> -
> >>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> > > > For additional commands, e-mail: users-help@maven.apache.org
> >>> > >
> >>> > >
> >>> > >
> >>> > >
> >>> > >
> >>> > >
> >>> > >
> >>> >
> >>> ____________________________________________________________________
> >>> ______
> >>> > _
> >>> > > 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: users-unsubscribe@maven.apache.org
> >>> > > For additional commands, e-mail: users-help@maven.apache.org
> >>> > >
> >>> > >
> >>> > >
> >>> --------------------------------------------------------------------
> >>> -
> >>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> > > For additional commands, e-mail: users-help@maven.apache.org
> >>> > >
> >>> > >
> >>> >
> >>> >
> >>> --------------------------------------------------------------------
> >>> -
> >>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> > For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> ____________________________________________________________________
> >>> _______
> >>> 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: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Vincent Massol <vi...@massol.net>.
On Mar 9, 2007, at 2:16 PM, Steve Shucker wrote:

> I don't think AspectJ and Clover are compatible.

Hmmm they might be if you run them in the right order. Run Clover  
first on sources and then AspectJ on either generated sources or on  
the JAR. This should work I think, although I don't recall having  
tried this.

-Vincent


> We use Cobertura instead.  The coverage report isn't as nice, but  
> it is functional.  For maven1, there's also an emma plugin.
>
> -Steve
>
> Michael Waluk wrote:
>> Hi,
>>
>> I can't find much else regarding using AspectJ with Clover.  Were  
>> you able
>> to get it working with an example AspectJ project?
>>
>> Has anyone been successful with this yet?  We have it to the point  
>> where we
>> are getting 0% coverage for some reason, but I haven't spent much  
>> time on
>> it.  I'd bother if there were some success stories out there.
>>
>> Thanks for any info,
>> Michael
>>
>>
>> On 7/26/06, Vincent Massol <vi...@massol.net> wrote:
>>>
>>>
>>>
>>> > -----Original Message-----
>>> > From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
>>> > Sent: mercredi 26 juillet 2006 19:53
>>> > To: Maven Users List
>>> > Subject: Re: Code coverage with AspectJ?
>>> >
>>> > On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
>>> > > I use cobetura and load-time weaving during unit-tests to do  
>>> this.  To
>>> > use load-time weaving you must fork at least once and provide the
>>> > javaagent as an <argline>
>>> > >
>>> > > -----Original Message-----
>>> > > From: Vincent Massol [mailto:vincent@massol.net]
>>> > > Sent: Wednesday, July 26, 2006 8:42 AM
>>> > > To: 'Maven Users List'
>>> > > Subject: RE: Code coverage with AspectJ?
>>> > >
>>> > >
>>> > >
>>> > > > -----Original Message-----
>>> > > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On  
>>> Behalf Of
>>> > Carlos
>>> > > > Sanchez
>>> > > > Sent: mercredi 26 juillet 2006 17:29
>>> > > > To: Maven Users List
>>> > > > Subject: Re: Code coverage with AspectJ?
>>> > > >
>>> > > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
>>> > > > > 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.
>>> > > >
>>> > > > seems not possible:
>>> > > >
>>> > > > [quote]
>>> > > > Indeed running AspectJ AFTER Clover works. I'm using that  
>>> for now,
>>> so
>>> > > > that I at least have SOME Clover data.
>>> > > > The thing I would like though, is to run AspectJ BEFORE  
>>> Clover runs,
>>> > > > so I also have Clover data on the AspectJ-sources!
>>> > > > As I see it, there are 2 ways to do this:
>>> > > >
>>> > > > 1) AspectJ weaves his new files and writes them out as  
>>> sources so
>>> > > > Clover can work on them. The problem here will be that
>>> > > > Clover can't show the reports on AspectJ-files, but rather  
>>> on the
>>> > > > weaved files.
>>> > >
>>> > > Why not? If you point the Clover plugin to the generated  
>>> sources it
>>> > should
>>> > > work fine, no? I guess I'd need to try it.
>>> > >
>>> > > > It's a solution, but what would be really great
>>> > > > is:
>>> > > > 2) Clover examines the AspectJ sources and adds his  
>>> statements to
>>> > > > those files. Then AspectJ can do his normal thing and
>>> > > > Clover's reports should show the coverage in the correct  
>>> files and
>>> > > > calculate the EXACT amount of times the statements have
>>> > > > been called.
>>> > >
>>> > > I don't understand this solution. Is clover running before  
>>> aspectj in
>>> > this
>>> > > case? If so then we're back to the first solution above, no?
>>> > >
>>> > > > Unfortunately I already heard from Cenqua that atm Clover  
>>> doesn't
>>> know
>>> > > > how to handle AspectJ sources... So I think that the
>>> > > > plugin will have the same problems...
>>> > >
>>> > > Ah maybe there's some issue. If someone could show me a very  
>>> simple
>>> > aspectj
>>> > > project (one simple class, one aspect, one test and a POM  
>>> using the
>>> > aspectj
>>> > > plugin) then I could add it to the clover plugin's test suite  
>>> and try
>>> it
>>> > > out.
>>> >
>>> > You will find some here :
>>> > http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
>>> > plugin/src/test/projects/
>>> >
>>> > But as Carlos mentioned. Clover and aspectJ is not really  
>>> compatible
>>>
>>> Thanks for the link. Could you elaborate just a little more about  
>>> the
>>> incompatibility before I spend too much time looking into it? :-)
>>>
>>> Thanks
>>> -Vincent
>>>
>>> > > > > Is there a Maven2 plugin for emma or cobetura?
>>> > > >
>>> > > > cobertura, and it plays well with aspectj afaik, you have  
>>> to make
>>> sure
>>> > > > the aspectj plugin doesn't recompile from sources for what  
>>> I read in
>>> > > > the cobertura mailing list
>>> > > >
>>> > > > >
>>> > > > > --
>>> > > > > Howard M. Lewis Ship
>>> > > > > TWD Consulting, Inc.
>>> > > > > Independent J2EE / Open-Source Java Consultant
>>> > > > > Creator and PMC Chair, Apache Tapestry
>>> > > > > Creator, Apache HiveMind
>>> > > > >
>>> > > > > Professional Tapestry training, mentoring, support
>>> > > > > and project work.  http://howardlewisship.com
>>> > > > >
>>> > > > >
>>> --------------------------------------------------------------------
>>> > -
>>> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > > > > For additional commands, e-mail: users-help@maven.apache.org
>>> > > > >
>>> > > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > I could give you my word as a Spaniard.
>>> > > > No good. I've known too many Spaniards.
>>> > > >                              -- The Princess Bride
>>> > > >
>>> > > >
>>> -------------------------------------------------------------------- 
>>> -
>>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > > > For additional commands, e-mail: users-help@maven.apache.org
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> >
>>> ____________________________________________________________________ 
>>> ______
>>> > _
>>> > > 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: users-unsubscribe@maven.apache.org
>>> > > For additional commands, e-mail: users-help@maven.apache.org
>>> > >
>>> > >
>>> > >  
>>> -------------------------------------------------------------------- 
>>> -
>>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > > For additional commands, e-mail: users-help@maven.apache.org
>>> > >
>>> > >
>>> >
>>> >  
>>> -------------------------------------------------------------------- 
>>> -
>>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ____________________________________________________________________ 
>>> _______
>>> 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: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Steve Shucker <ss...@vmsinfo.com>.
I don't think AspectJ and Clover are compatible.  We use Cobertura 
instead.  The coverage report isn't as nice, but it is functional.  For 
maven1, there's also an emma plugin.

-Steve

Michael Waluk wrote:
> Hi,
>
> I can't find much else regarding using AspectJ with Clover.  Were you 
> able
> to get it working with an example AspectJ project?
>
> Has anyone been successful with this yet?  We have it to the point 
> where we
> are getting 0% coverage for some reason, but I haven't spent much time on
> it.  I'd bother if there were some success stories out there.
>
> Thanks for any info,
> Michael
>
>
> On 7/26/06, Vincent Massol <vi...@massol.net> wrote:
>>
>>
>>
>> > -----Original Message-----
>> > From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
>> > Sent: mercredi 26 juillet 2006 19:53
>> > To: Maven Users List
>> > Subject: Re: Code coverage with AspectJ?
>> >
>> > On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
>> > > I use cobetura and load-time weaving during unit-tests to do 
>> this.  To
>> > use load-time weaving you must fork at least once and provide the
>> > javaagent as an <argline>
>> > >
>> > > -----Original Message-----
>> > > From: Vincent Massol [mailto:vincent@massol.net]
>> > > Sent: Wednesday, July 26, 2006 8:42 AM
>> > > To: 'Maven Users List'
>> > > Subject: RE: Code coverage with AspectJ?
>> > >
>> > >
>> > >
>> > > > -----Original Message-----
>> > > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of
>> > Carlos
>> > > > Sanchez
>> > > > Sent: mercredi 26 juillet 2006 17:29
>> > > > To: Maven Users List
>> > > > Subject: Re: Code coverage with AspectJ?
>> > > >
>> > > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
>> > > > > 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.
>> > > >
>> > > > seems not possible:
>> > > >
>> > > > [quote]
>> > > > Indeed running AspectJ AFTER Clover works. I'm using that for now,
>> so
>> > > > that I at least have SOME Clover data.
>> > > > The thing I would like though, is to run AspectJ BEFORE Clover 
>> runs,
>> > > > so I also have Clover data on the AspectJ-sources!
>> > > > As I see it, there are 2 ways to do this:
>> > > >
>> > > > 1) AspectJ weaves his new files and writes them out as sources so
>> > > > Clover can work on them. The problem here will be that
>> > > > Clover can't show the reports on AspectJ-files, but rather on the
>> > > > weaved files.
>> > >
>> > > Why not? If you point the Clover plugin to the generated sources it
>> > should
>> > > work fine, no? I guess I'd need to try it.
>> > >
>> > > > It's a solution, but what would be really great
>> > > > is:
>> > > > 2) Clover examines the AspectJ sources and adds his statements to
>> > > > those files. Then AspectJ can do his normal thing and
>> > > > Clover's reports should show the coverage in the correct files and
>> > > > calculate the EXACT amount of times the statements have
>> > > > been called.
>> > >
>> > > I don't understand this solution. Is clover running before 
>> aspectj in
>> > this
>> > > case? If so then we're back to the first solution above, no?
>> > >
>> > > > Unfortunately I already heard from Cenqua that atm Clover doesn't
>> know
>> > > > how to handle AspectJ sources... So I think that the
>> > > > plugin will have the same problems...
>> > >
>> > > Ah maybe there's some issue. If someone could show me a very simple
>> > aspectj
>> > > project (one simple class, one aspect, one test and a POM using the
>> > aspectj
>> > > plugin) then I could add it to the clover plugin's test suite and 
>> try
>> it
>> > > out.
>> >
>> > You will find some here :
>> > http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
>> > plugin/src/test/projects/
>> >
>> > But as Carlos mentioned. Clover and aspectJ is not really compatible
>>
>> Thanks for the link. Could you elaborate just a little more about the
>> incompatibility before I spend too much time looking into it? :-)
>>
>> Thanks
>> -Vincent
>>
>> > > > > Is there a Maven2 plugin for emma or cobetura?
>> > > >
>> > > > cobertura, and it plays well with aspectj afaik, you have to make
>> sure
>> > > > the aspectj plugin doesn't recompile from sources for what I 
>> read in
>> > > > the cobertura mailing list
>> > > >
>> > > > >
>> > > > > --
>> > > > > Howard M. Lewis Ship
>> > > > > TWD Consulting, Inc.
>> > > > > Independent J2EE / Open-Source Java Consultant
>> > > > > Creator and PMC Chair, Apache Tapestry
>> > > > > Creator, Apache HiveMind
>> > > > >
>> > > > > Professional Tapestry training, mentoring, support
>> > > > > and project work.  http://howardlewisship.com
>> > > > >
>> > > > >
>> --------------------------------------------------------------------
>> > -
>> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > > > For additional commands, e-mail: users-help@maven.apache.org
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > > --
>> > > > I could give you my word as a Spaniard.
>> > > > No good. I've known too many Spaniards.
>> > > >                              -- The Princess Bride
>> > > >
>> > > >
>> ---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > > For additional commands, e-mail: users-help@maven.apache.org
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> >
>> __________________________________________________________________________ 
>>
>> > _
>> > > 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: users-unsubscribe@maven.apache.org
>> > > For additional commands, e-mail: users-help@maven.apache.org
>> > >
>> > >
>> > > 
>> ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > For additional commands, e-mail: users-help@maven.apache.org
>> > >
>> > >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>
>>
>>
>>
>> ___________________________________________________________________________ 
>>
>> 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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Hey, do you know what happened to the training I was supposed to be
coming out for? Bal has dropped off the map.

On 3/8/07, Michael Waluk <mw...@gmail.com> wrote:
> Hi,
>
> I can't find much else regarding using AspectJ with Clover.  Were you able
> to get it working with an example AspectJ project?
>
> Has anyone been successful with this yet?  We have it to the point where we
> are getting 0% coverage for some reason, but I haven't spent much time on
> it.  I'd bother if there were some success stories out there.
>
> Thanks for any info,
> Michael
>
>
> On 7/26/06, Vincent Massol <vi...@massol.net> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
> > > Sent: mercredi 26 juillet 2006 19:53
> > > To: Maven Users List
> > > Subject: Re: Code coverage with AspectJ?
> > >
> > > On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
> > > > I use cobetura and load-time weaving during unit-tests to do this.  To
> > > use load-time weaving you must fork at least once and provide the
> > > javaagent as an <argline>
> > > >
> > > > -----Original Message-----
> > > > From: Vincent Massol [mailto:vincent@massol.net]
> > > > Sent: Wednesday, July 26, 2006 8:42 AM
> > > > To: 'Maven Users List'
> > > > Subject: RE: Code coverage with AspectJ?
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of
> > > Carlos
> > > > > Sanchez
> > > > > Sent: mercredi 26 juillet 2006 17:29
> > > > > To: Maven Users List
> > > > > Subject: Re: Code coverage with AspectJ?
> > > > >
> > > > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > > > > > 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.
> > > > >
> > > > > seems not possible:
> > > > >
> > > > > [quote]
> > > > > Indeed running AspectJ AFTER Clover works. I'm using that for now,
> > so
> > > > > that I at least have SOME Clover data.
> > > > > The thing I would like though, is to run AspectJ BEFORE Clover runs,
> > > > > so I also have Clover data on the AspectJ-sources!
> > > > > As I see it, there are 2 ways to do this:
> > > > >
> > > > > 1) AspectJ weaves his new files and writes them out as sources so
> > > > > Clover can work on them. The problem here will be that
> > > > > Clover can't show the reports on AspectJ-files, but rather on the
> > > > > weaved files.
> > > >
> > > > Why not? If you point the Clover plugin to the generated sources it
> > > should
> > > > work fine, no? I guess I'd need to try it.
> > > >
> > > > > It's a solution, but what would be really great
> > > > > is:
> > > > > 2) Clover examines the AspectJ sources and adds his statements to
> > > > > those files. Then AspectJ can do his normal thing and
> > > > > Clover's reports should show the coverage in the correct files and
> > > > > calculate the EXACT amount of times the statements have
> > > > > been called.
> > > >
> > > > I don't understand this solution. Is clover running before aspectj in
> > > this
> > > > case? If so then we're back to the first solution above, no?
> > > >
> > > > > Unfortunately I already heard from Cenqua that atm Clover doesn't
> > know
> > > > > how to handle AspectJ sources... So I think that the
> > > > > plugin will have the same problems...
> > > >
> > > > Ah maybe there's some issue. If someone could show me a very simple
> > > aspectj
> > > > project (one simple class, one aspect, one test and a POM using the
> > > aspectj
> > > > plugin) then I could add it to the clover plugin's test suite and try
> > it
> > > > out.
> > >
> > > You will find some here :
> > > http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
> > > plugin/src/test/projects/
> > >
> > > But as Carlos mentioned. Clover and aspectJ is not really compatible
> >
> > Thanks for the link. Could you elaborate just a little more about the
> > incompatibility before I spend too much time looking into it? :-)
> >
> > Thanks
> > -Vincent
> >
> > > > > > Is there a Maven2 plugin for emma or cobetura?
> > > > >
> > > > > cobertura, and it plays well with aspectj afaik, you have to make
> > sure
> > > > > the aspectj plugin doesn't recompile from sources for what I read in
> > > > > the cobertura mailing list
> > > > >
> > > > > >
> > > > > > --
> > > > > > Howard M. Lewis Ship
> > > > > > TWD Consulting, Inc.
> > > > > > Independent J2EE / Open-Source Java Consultant
> > > > > > Creator and PMC Chair, Apache Tapestry
> > > > > > Creator, Apache HiveMind
> > > > > >
> > > > > > Professional Tapestry training, mentoring, support
> > > > > > and project work.  http://howardlewisship.com
> > > > > >
> > > > > >
> > --------------------------------------------------------------------
> > > -
> > > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > I could give you my word as a Spaniard.
> > > > > No good. I've known too many Spaniards.
> > > > >                              -- The Princess Bride
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > __________________________________________________________________________
> > > _
> > > > 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: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
> >
> >
> >
> > ___________________________________________________________________________
> > 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Michael Waluk <mw...@gmail.com>.
Hi,

I can't find much else regarding using AspectJ with Clover.  Were you able
to get it working with an example AspectJ project?

Has anyone been successful with this yet?  We have it to the point where we
are getting 0% coverage for some reason, but I haven't spent much time on
it.  I'd bother if there were some success stories out there.

Thanks for any info,
Michael


On 7/26/06, Vincent Massol <vi...@massol.net> wrote:
>
>
>
> > -----Original Message-----
> > From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
> > Sent: mercredi 26 juillet 2006 19:53
> > To: Maven Users List
> > Subject: Re: Code coverage with AspectJ?
> >
> > On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
> > > I use cobetura and load-time weaving during unit-tests to do this.  To
> > use load-time weaving you must fork at least once and provide the
> > javaagent as an <argline>
> > >
> > > -----Original Message-----
> > > From: Vincent Massol [mailto:vincent@massol.net]
> > > Sent: Wednesday, July 26, 2006 8:42 AM
> > > To: 'Maven Users List'
> > > Subject: RE: Code coverage with AspectJ?
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of
> > Carlos
> > > > Sanchez
> > > > Sent: mercredi 26 juillet 2006 17:29
> > > > To: Maven Users List
> > > > Subject: Re: Code coverage with AspectJ?
> > > >
> > > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > > > > 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.
> > > >
> > > > seems not possible:
> > > >
> > > > [quote]
> > > > Indeed running AspectJ AFTER Clover works. I'm using that for now,
> so
> > > > that I at least have SOME Clover data.
> > > > The thing I would like though, is to run AspectJ BEFORE Clover runs,
> > > > so I also have Clover data on the AspectJ-sources!
> > > > As I see it, there are 2 ways to do this:
> > > >
> > > > 1) AspectJ weaves his new files and writes them out as sources so
> > > > Clover can work on them. The problem here will be that
> > > > Clover can't show the reports on AspectJ-files, but rather on the
> > > > weaved files.
> > >
> > > Why not? If you point the Clover plugin to the generated sources it
> > should
> > > work fine, no? I guess I'd need to try it.
> > >
> > > > It's a solution, but what would be really great
> > > > is:
> > > > 2) Clover examines the AspectJ sources and adds his statements to
> > > > those files. Then AspectJ can do his normal thing and
> > > > Clover's reports should show the coverage in the correct files and
> > > > calculate the EXACT amount of times the statements have
> > > > been called.
> > >
> > > I don't understand this solution. Is clover running before aspectj in
> > this
> > > case? If so then we're back to the first solution above, no?
> > >
> > > > Unfortunately I already heard from Cenqua that atm Clover doesn't
> know
> > > > how to handle AspectJ sources... So I think that the
> > > > plugin will have the same problems...
> > >
> > > Ah maybe there's some issue. If someone could show me a very simple
> > aspectj
> > > project (one simple class, one aspect, one test and a POM using the
> > aspectj
> > > plugin) then I could add it to the clover plugin's test suite and try
> it
> > > out.
> >
> > You will find some here :
> > http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
> > plugin/src/test/projects/
> >
> > But as Carlos mentioned. Clover and aspectJ is not really compatible
>
> Thanks for the link. Could you elaborate just a little more about the
> incompatibility before I spend too much time looking into it? :-)
>
> Thanks
> -Vincent
>
> > > > > Is there a Maven2 plugin for emma or cobetura?
> > > >
> > > > cobertura, and it plays well with aspectj afaik, you have to make
> sure
> > > > the aspectj plugin doesn't recompile from sources for what I read in
> > > > the cobertura mailing list
> > > >
> > > > >
> > > > > --
> > > > > Howard M. Lewis Ship
> > > > > TWD Consulting, Inc.
> > > > > Independent J2EE / Open-Source Java Consultant
> > > > > Creator and PMC Chair, Apache Tapestry
> > > > > Creator, Apache HiveMind
> > > > >
> > > > > Professional Tapestry training, mentoring, support
> > > > > and project work.  http://howardlewisship.com
> > > > >
> > > > >
> --------------------------------------------------------------------
> > -
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > I could give you my word as a Spaniard.
> > > > No good. I've known too many Spaniards.
> > > >                              -- The Princess Bride
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> __________________________________________________________________________
> > _
> > > 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: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>
>
>
> ___________________________________________________________________________
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Code coverage with AspectJ?

Posted by Carlos Sanchez <ca...@apache.org>.
I just copied that from another thread about Clover and AspectJ. I
never tried it.

On 7/26/06, Kaare Nilsen <ka...@gmail.com> wrote:
> On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
> > I use cobetura and load-time weaving during unit-tests to do this.  To use load-time weaving you must fork at least once and provide the javaagent as an <argline>
> >
> > -----Original Message-----
> > From: Vincent Massol [mailto:vincent@massol.net]
> > Sent: Wednesday, July 26, 2006 8:42 AM
> > To: 'Maven Users List'
> > Subject: RE: Code coverage with AspectJ?
> >
> >
> >
> > > -----Original Message-----
> > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of Carlos
> > > Sanchez
> > > Sent: mercredi 26 juillet 2006 17:29
> > > To: Maven Users List
> > > Subject: Re: Code coverage with AspectJ?
> > >
> > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > > > 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.
> > >
> > > seems not possible:
> > >
> > > [quote]
> > > Indeed running AspectJ AFTER Clover works. I'm using that for now, so
> > > that I at least have SOME Clover data.
> > > The thing I would like though, is to run AspectJ BEFORE Clover runs,
> > > so I also have Clover data on the AspectJ-sources!
> > > As I see it, there are 2 ways to do this:
> > >
> > > 1) AspectJ weaves his new files and writes them out as sources so
> > > Clover can work on them. The problem here will be that
> > > Clover can't show the reports on AspectJ-files, but rather on the
> > > weaved files.
> >
> > Why not? If you point the Clover plugin to the generated sources it should
> > work fine, no? I guess I'd need to try it.
> >
> > > It's a solution, but what would be really great
> > > is:
> > > 2) Clover examines the AspectJ sources and adds his statements to
> > > those files. Then AspectJ can do his normal thing and
> > > Clover's reports should show the coverage in the correct files and
> > > calculate the EXACT amount of times the statements have
> > > been called.
> >
> > I don't understand this solution. Is clover running before aspectj in this
> > case? If so then we're back to the first solution above, no?
> >
> > > Unfortunately I already heard from Cenqua that atm Clover doesn't know
> > > how to handle AspectJ sources... So I think that the
> > > plugin will have the same problems...
> >
> > Ah maybe there's some issue. If someone could show me a very simple aspectj
> > project (one simple class, one aspect, one test and a POM using the aspectj
> > plugin) then I could add it to the clover plugin's test suite and try it
> > out.
>
> You will find some here :
> http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-plugin/src/test/projects/
>
> But as Carlos mentioned. Clover and aspectJ is not really compatible
>
> >
> > Thanks
> > -Vincent
> >
> > > [quote]
> > >
> > >
> > > >
> > > > Is there a Maven2 plugin for emma or cobetura?
> > >
> > > cobertura, and it plays well with aspectj afaik, you have to make sure
> > > the aspectj plugin doesn't recompile from sources for what I read in
> > > the cobertura mailing list
> > >
> > > >
> > > > --
> > > > Howard M. Lewis Ship
> > > > TWD Consulting, Inc.
> > > > Independent J2EE / Open-Source Java Consultant
> > > > Creator and PMC Chair, Apache Tapestry
> > > > Creator, Apache HiveMind
> > > >
> > > > Professional Tapestry training, mentoring, support
> > > > and project work.  http://howardlewisship.com
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > I could give you my word as a Spaniard.
> > > No good. I've known too many Spaniards.
> > >                              -- The Princess Bride
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
> >
> >
> > ___________________________________________________________________________
> > 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code coverage with AspectJ?

Posted by Vincent Massol <vi...@massol.net>.

> -----Original Message-----
> From: Kaare Nilsen [mailto:kaare.nilsen@gmail.com]
> Sent: mercredi 26 juillet 2006 19:53
> To: Maven Users List
> Subject: Re: Code coverage with AspectJ?
> 
> On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
> > I use cobetura and load-time weaving during unit-tests to do this.  To
> use load-time weaving you must fork at least once and provide the
> javaagent as an <argline>
> >
> > -----Original Message-----
> > From: Vincent Massol [mailto:vincent@massol.net]
> > Sent: Wednesday, July 26, 2006 8:42 AM
> > To: 'Maven Users List'
> > Subject: RE: Code coverage with AspectJ?
> >
> >
> >
> > > -----Original Message-----
> > > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of
> Carlos
> > > Sanchez
> > > Sent: mercredi 26 juillet 2006 17:29
> > > To: Maven Users List
> > > Subject: Re: Code coverage with AspectJ?
> > >
> > > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > > > 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.
> > >
> > > seems not possible:
> > >
> > > [quote]
> > > Indeed running AspectJ AFTER Clover works. I'm using that for now, so
> > > that I at least have SOME Clover data.
> > > The thing I would like though, is to run AspectJ BEFORE Clover runs,
> > > so I also have Clover data on the AspectJ-sources!
> > > As I see it, there are 2 ways to do this:
> > >
> > > 1) AspectJ weaves his new files and writes them out as sources so
> > > Clover can work on them. The problem here will be that
> > > Clover can't show the reports on AspectJ-files, but rather on the
> > > weaved files.
> >
> > Why not? If you point the Clover plugin to the generated sources it
> should
> > work fine, no? I guess I'd need to try it.
> >
> > > It's a solution, but what would be really great
> > > is:
> > > 2) Clover examines the AspectJ sources and adds his statements to
> > > those files. Then AspectJ can do his normal thing and
> > > Clover's reports should show the coverage in the correct files and
> > > calculate the EXACT amount of times the statements have
> > > been called.
> >
> > I don't understand this solution. Is clover running before aspectj in
> this
> > case? If so then we're back to the first solution above, no?
> >
> > > Unfortunately I already heard from Cenqua that atm Clover doesn't know
> > > how to handle AspectJ sources... So I think that the
> > > plugin will have the same problems...
> >
> > Ah maybe there's some issue. If someone could show me a very simple
> aspectj
> > project (one simple class, one aspect, one test and a POM using the
> aspectj
> > plugin) then I could add it to the clover plugin's test suite and try it
> > out.
> 
> You will find some here :
> http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-
> plugin/src/test/projects/
> 
> But as Carlos mentioned. Clover and aspectJ is not really compatible

Thanks for the link. Could you elaborate just a little more about the
incompatibility before I spend too much time looking into it? :-)

Thanks
-Vincent

> > > > Is there a Maven2 plugin for emma or cobetura?
> > >
> > > cobertura, and it plays well with aspectj afaik, you have to make sure
> > > the aspectj plugin doesn't recompile from sources for what I read in
> > > the cobertura mailing list
> > >
> > > >
> > > > --
> > > > Howard M. Lewis Ship
> > > > TWD Consulting, Inc.
> > > > Independent J2EE / Open-Source Java Consultant
> > > > Creator and PMC Chair, Apache Tapestry
> > > > Creator, Apache HiveMind
> > > >
> > > > Professional Tapestry training, mentoring, support
> > > > and project work.  http://howardlewisship.com
> > > >
> > > > --------------------------------------------------------------------
> -
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > I could give you my word as a Spaniard.
> > > No good. I've known too many Spaniards.
> > >                              -- The Princess Bride
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
> >
> >
> >
> __________________________________________________________________________
> _
> > 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


	

	
		
___________________________________________________________________________ 
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Kaare Nilsen <ka...@gmail.com>.
On 26/07/06, Jason Chaffee <ja...@tvworks.com> wrote:
> I use cobetura and load-time weaving during unit-tests to do this.  To use load-time weaving you must fork at least once and provide the javaagent as an <argline>
>
> -----Original Message-----
> From: Vincent Massol [mailto:vincent@massol.net]
> Sent: Wednesday, July 26, 2006 8:42 AM
> To: 'Maven Users List'
> Subject: RE: Code coverage with AspectJ?
>
>
>
> > -----Original Message-----
> > From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of Carlos
> > Sanchez
> > Sent: mercredi 26 juillet 2006 17:29
> > To: Maven Users List
> > Subject: Re: Code coverage with AspectJ?
> >
> > On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > > 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.
> >
> > seems not possible:
> >
> > [quote]
> > Indeed running AspectJ AFTER Clover works. I'm using that for now, so
> > that I at least have SOME Clover data.
> > The thing I would like though, is to run AspectJ BEFORE Clover runs,
> > so I also have Clover data on the AspectJ-sources!
> > As I see it, there are 2 ways to do this:
> >
> > 1) AspectJ weaves his new files and writes them out as sources so
> > Clover can work on them. The problem here will be that
> > Clover can't show the reports on AspectJ-files, but rather on the
> > weaved files.
>
> Why not? If you point the Clover plugin to the generated sources it should
> work fine, no? I guess I'd need to try it.
>
> > It's a solution, but what would be really great
> > is:
> > 2) Clover examines the AspectJ sources and adds his statements to
> > those files. Then AspectJ can do his normal thing and
> > Clover's reports should show the coverage in the correct files and
> > calculate the EXACT amount of times the statements have
> > been called.
>
> I don't understand this solution. Is clover running before aspectj in this
> case? If so then we're back to the first solution above, no?
>
> > Unfortunately I already heard from Cenqua that atm Clover doesn't know
> > how to handle AspectJ sources... So I think that the
> > plugin will have the same problems...
>
> Ah maybe there's some issue. If someone could show me a very simple aspectj
> project (one simple class, one aspect, one test and a POM using the aspectj
> plugin) then I could add it to the clover plugin's test suite and try it
> out.

You will find some here :
http://svn.codehaus.org/mojo/trunk/mojo/aspectj-maven-plugin/src/test/projects/

But as Carlos mentioned. Clover and aspectJ is not really compatible

>
> Thanks
> -Vincent
>
> > [quote]
> >
> >
> > >
> > > Is there a Maven2 plugin for emma or cobetura?
> >
> > cobertura, and it plays well with aspectj afaik, you have to make sure
> > the aspectj plugin doesn't recompile from sources for what I read in
> > the cobertura mailing list
> >
> > >
> > > --
> > > Howard M. Lewis Ship
> > > TWD Consulting, Inc.
> > > Independent J2EE / Open-Source Java Consultant
> > > Creator and PMC Chair, Apache Tapestry
> > > Creator, Apache HiveMind
> > >
> > > Professional Tapestry training, mentoring, support
> > > and project work.  http://howardlewisship.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > I could give you my word as a Spaniard.
> > No good. I've known too many Spaniards.
> >                              -- The Princess Bride
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>
>
> ___________________________________________________________________________
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code coverage with AspectJ?

Posted by Jason Chaffee <ja...@tvworks.com>.
I use cobetura and load-time weaving during unit-tests to do this.  To use load-time weaving you must fork at least once and provide the javaagent as an <argline>

-----Original Message-----
From: Vincent Massol [mailto:vincent@massol.net] 
Sent: Wednesday, July 26, 2006 8:42 AM
To: 'Maven Users List'
Subject: RE: Code coverage with AspectJ?



> -----Original Message-----
> From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of Carlos
> Sanchez
> Sent: mercredi 26 juillet 2006 17:29
> To: Maven Users List
> Subject: Re: Code coverage with AspectJ?
> 
> On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > 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.
> 
> seems not possible:
> 
> [quote]
> Indeed running AspectJ AFTER Clover works. I'm using that for now, so
> that I at least have SOME Clover data.
> The thing I would like though, is to run AspectJ BEFORE Clover runs,
> so I also have Clover data on the AspectJ-sources!
> As I see it, there are 2 ways to do this:
> 
> 1) AspectJ weaves his new files and writes them out as sources so
> Clover can work on them. The problem here will be that
> Clover can't show the reports on AspectJ-files, but rather on the
> weaved files. 

Why not? If you point the Clover plugin to the generated sources it should
work fine, no? I guess I'd need to try it.

> It's a solution, but what would be really great
> is:
> 2) Clover examines the AspectJ sources and adds his statements to
> those files. Then AspectJ can do his normal thing and
> Clover's reports should show the coverage in the correct files and
> calculate the EXACT amount of times the statements have
> been called.

I don't understand this solution. Is clover running before aspectj in this
case? If so then we're back to the first solution above, no?
 
> Unfortunately I already heard from Cenqua that atm Clover doesn't know
> how to handle AspectJ sources... So I think that the
> plugin will have the same problems...

Ah maybe there's some issue. If someone could show me a very simple aspectj
project (one simple class, one aspect, one test and a POM using the aspectj
plugin) then I could add it to the clover plugin's test suite and try it
out.

Thanks
-Vincent

> [quote]
> 
> 
> >
> > Is there a Maven2 plugin for emma or cobetura?
> 
> cobertura, and it plays well with aspectj afaik, you have to make sure
> the aspectj plugin doesn't recompile from sources for what I read in
> the cobertura mailing list
> 
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> 
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


	

	
		
___________________________________________________________________________ 
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code coverage with AspectJ?

Posted by Vincent Massol <vi...@massol.net>.

> -----Original Message-----
> From: carlossg@gmail.com [mailto:carlossg@gmail.com] On Behalf Of Carlos
> Sanchez
> Sent: mercredi 26 juillet 2006 17:29
> To: Maven Users List
> Subject: Re: Code coverage with AspectJ?
> 
> On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> > 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.
> 
> seems not possible:
> 
> [quote]
> Indeed running AspectJ AFTER Clover works. I'm using that for now, so
> that I at least have SOME Clover data.
> The thing I would like though, is to run AspectJ BEFORE Clover runs,
> so I also have Clover data on the AspectJ-sources!
> As I see it, there are 2 ways to do this:
> 
> 1) AspectJ weaves his new files and writes them out as sources so
> Clover can work on them. The problem here will be that
> Clover can't show the reports on AspectJ-files, but rather on the
> weaved files. 

Why not? If you point the Clover plugin to the generated sources it should
work fine, no? I guess I'd need to try it.

> It's a solution, but what would be really great
> is:
> 2) Clover examines the AspectJ sources and adds his statements to
> those files. Then AspectJ can do his normal thing and
> Clover's reports should show the coverage in the correct files and
> calculate the EXACT amount of times the statements have
> been called.

I don't understand this solution. Is clover running before aspectj in this
case? If so then we're back to the first solution above, no?
 
> Unfortunately I already heard from Cenqua that atm Clover doesn't know
> how to handle AspectJ sources... So I think that the
> plugin will have the same problems...

Ah maybe there's some issue. If someone could show me a very simple aspectj
project (one simple class, one aspect, one test and a POM using the aspectj
plugin) then I could add it to the clover plugin's test suite and try it
out.

Thanks
-Vincent

> [quote]
> 
> 
> >
> > Is there a Maven2 plugin for emma or cobetura?
> 
> cobertura, and it plays well with aspectj afaik, you have to make sure
> the aspectj plugin doesn't recompile from sources for what I read in
> the cobertura mailing list
> 
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> 
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


	

	
		
___________________________________________________________________________ 
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code coverage with AspectJ?

Posted by Carlos Sanchez <ca...@apache.org>.
On 7/26/06, Howard Lewis Ship <hl...@gmail.com> wrote:
> 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.

seems not possible:

[quote]
Indeed running AspectJ AFTER Clover works. I'm using that for now, so
that I at least have SOME Clover data.
The thing I would like though, is to run AspectJ BEFORE Clover runs,
so I also have Clover data on the AspectJ-sources!
As I see it, there are 2 ways to do this:

1) AspectJ weaves his new files and writes them out as sources so
Clover can work on them. The problem here will be that
Clover can't show the reports on AspectJ-files, but rather on the
weaved files. It's a solution, but what would be really great
is:
2) Clover examines the AspectJ sources and adds his statements to
those files. Then AspectJ can do his normal thing and
Clover's reports should show the coverage in the correct files and
calculate the EXACT amount of times the statements have
been called.

Unfortunately I already heard from Cenqua that atm Clover doesn't know
how to handle AspectJ sources... So I think that the
plugin will have the same problems...
[quote]


>
> Is there a Maven2 plugin for emma or cobetura?

cobertura, and it plays well with aspectj afaik, you have to make sure
the aspectj plugin doesn't recompile from sources for what I read in
the cobertura mailing list

>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code coverage with AspectJ?

Posted by Vincent Massol <vi...@massol.net>.
Hi Howard,

> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org