You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by lvdpal <lv...@lunaris-informatica.nl> on 2009/06/24 14:17:50 UTC

Putting instrumented classes on the classpath

Hello,

I've tried to put the classes that were instrumented by Cobertura on the
classpath so EasyB could find them. Just so Cobertura could see that my
classes are in fact tested. I had found a solution based on the Maven Antrun
plugin, but due to a bug in this plugin (which I reported in Jira:
http://jira.codehaus.org/browse/MANTRUN-112 ) it isn't working. Does anybody
have any other ideas on how to accomplish this?

Regards,
Linda
-- 
View this message in context: http://www.nabble.com/Putting-instrumented-classes-on-the-classpath-tp24183679p24183679.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Putting instrumented classes on the classpath

Posted by Mohan KR <km...@gmail.com>.
np..I will have to reword that, it will redirect the
project.build.outputDirectory
from target/classes to target/generated-classes/cobertura. If the plugins
are doing
the correct thing when constructing the classpath, they should use the
property
"project.build.outputDirectory".


Thanks,
mohan kr


-----Original Message-----
From: lvdpal [mailto:lvdpal@lunaris-informatica.nl] 
Sent: Wednesday, July 22, 2009 8:25 AM
To: users@maven.apache.org
Subject: RE: Putting instrumented classes on the classpath


Thanks, this at least gives me a hint where to start looking.


mkr wrote:
> 
> You have to give more information?  I have looked at the thread..but if
> you
> were using
> the cobertura-maven-plugin and just have the "intstrument" goal, it *WILL*
> put the 
> instrumented classes in the classpath. (i.e. classes/* will be redirected
> to
> generated-classes/*).
> Since plugin ordering varies between maven versions (if binding to same
> phase), I would make
> sure that the cobertura instrument goal is last executed in that phase.
> 
> Also, I think I replied yesterday, if you need the coverage xml file, then
> the standard cobertura
> plugin cannot do that *independently*, you can use the modded plugin....
> 
> Thanks,
> mohan kr
> 
> 
-- 
View this message in context:
http://www.nabble.com/Putting-instrumented-classes-on-the-classpath-tp241836
79p24606483.html
Sent from the Maven - Users mailing list archive at Nabble.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: Putting instrumented classes on the classpath

Posted by lvdpal <lv...@lunaris-informatica.nl>.
Thanks, this at least gives me a hint where to start looking.


mkr wrote:
> 
> You have to give more information?  I have looked at the thread..but if
> you
> were using
> the cobertura-maven-plugin and just have the "intstrument" goal, it *WILL*
> put the 
> instrumented classes in the classpath. (i.e. classes/* will be redirected
> to
> generated-classes/*).
> Since plugin ordering varies between maven versions (if binding to same
> phase), I would make
> sure that the cobertura instrument goal is last executed in that phase.
> 
> Also, I think I replied yesterday, if you need the coverage xml file, then
> the standard cobertura
> plugin cannot do that *independently*, you can use the modded plugin....
> 
> Thanks,
> mohan kr
> 
> 
-- 
View this message in context: http://www.nabble.com/Putting-instrumented-classes-on-the-classpath-tp24183679p24606483.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Putting instrumented classes on the classpath

Posted by Mohan KR <km...@gmail.com>.
You have to give more information?  I have looked at the thread..but if you
were using
the cobertura-maven-plugin and just have the "intstrument" goal, it *WILL*
put the 
instrumented classes in the classpath. (i.e. classes/* will be redirected to
generated-classes/*).
Since plugin ordering varies between maven versions (if binding to same
phase), I would make
sure that the cobertura instrument goal is last executed in that phase.

Also, I think I replied yesterday, if you need the coverage xml file, then
the standard cobertura
plugin cannot do that *independently*, you can use the modded plugin....

Thanks,
mohan kr

-----Original Message-----
From: lvdpal [mailto:lvdpal@lunaris-informatica.nl] 
Sent: Wednesday, July 22, 2009 4:23 AM
To: users@maven.apache.org
Subject: RE: Putting instrumented classes on the classpath


Because I'm still looking for a solution to this prolem. It's such a shame
to
use Sonar when having tests and not getting any code coverage.


lvdpal wrote:
> 
> Nobody else has any ideas?
> 

-- 
View this message in context:
http://www.nabble.com/Putting-instrumented-classes-on-the-classpath-tp241836
79p24602797.html
Sent from the Maven - Users mailing list archive at Nabble.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: Putting instrumented classes on the classpath

Posted by lvdpal <lv...@lunaris-informatica.nl>.
Because I'm still looking for a solution to this prolem. It's such a shame to
use Sonar when having tests and not getting any code coverage.


lvdpal wrote:
> 
> Nobody else has any ideas?
> 

-- 
View this message in context: http://www.nabble.com/Putting-instrumented-classes-on-the-classpath-tp24183679p24602797.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Putting instrumented classes on the classpath

Posted by lvdpal <lv...@lunaris-informatica.nl>.
Nobody else has any ideas?
-- 
View this message in context: http://www.nabble.com/Putting-instrumented-classes-on-the-classpath-tp24183679p24425518.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Putting instrumented classes on the classpath

Posted by lvdpal <lv...@lunaris-informatica.nl>.
Hi Mohan,

I'm not quite sure what you're saying, but yeah, as far as I know the
instrumented files have to be on the classpath for EasyB to pick them up.
-- 
View this message in context: http://www.nabble.com/Putting-instrumented-classes-on-the-classpath-tp24183679p24184602.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Putting instrumented classes on the classpath

Posted by Mohan KR <km...@gmail.com>.
Maybe you can put have *two* executions of the antrun plugin?

But, going to the original issue, it appears that the instrumented cobertura
classes
*should* be in the classpath of the maven reactor?  Because I look at the
source
for the instrumented goal..this is what it shows

            // Set the instrumented classes to be the new output directory
(for other plugins to pick up)
            project.getBuild().setOutputDirectory(
instrumentedDirectory.getPath() );
            System.setProperty( "project.build.outputDirectory",
instrumentedDirectory.getPath() );

Thanks,
mohan kr


-----Original Message-----
From: lvdpal [mailto:lvdpal@lunaris-informatica.nl] 
Sent: Wednesday, June 24, 2009 7:18 AM
To: users@maven.apache.org
Subject: Putting instrumented classes on the classpath


Hello,

I've tried to put the classes that were instrumented by Cobertura on the
classpath so EasyB could find them. Just so Cobertura could see that my
classes are in fact tested. I had found a solution based on the Maven Antrun
plugin, but due to a bug in this plugin (which I reported in Jira:
http://jira.codehaus.org/browse/MANTRUN-112 ) it isn't working. Does anybody
have any other ideas on how to accomplish this?

Regards,
Linda
-- 
View this message in context:
http://www.nabble.com/Putting-instrumented-classes-on-the-classpath-tp241836
79p24183679.html
Sent from the Maven - Users mailing list archive at Nabble.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