EMMA / Cobertura issue
Hello
How can I control the environment for EMMA ?
The problem is as follows;
1) I want to see results from EMMA and at the same time have an ANT task using Cobertura.
2) when I enable "coverage reports" in TeamCity then I get ClassFormatExceptions in the ant Cobertura task. It seems that somehow EMMA is either using a different java version or is over writing class/instrumented files.
3) If I disable the EMMA coverage then everything works perfectly fine.
I am setting JAVA_HOME for my build as well as using ANT_HOME. And I have configured agents to download the source and build.
My guess is that EMMA is using some older java version ?
Thanks for the help
Please sign in to leave a comment.
Cobertura and Emma both instrument Java classes, both of them won't work if classes already instrumented. As a workaround you can skip Cobertura target if build is run under build configuration with some property.
--
Pavel Sher
I'm now doing exactly this. I set a "skip.instrument" property in the Ant build if the property emma.coverage.out.file (set by Teamcity if coverage is enabled) exists, and then make the Cobertura-related targets unless="skip.instrument" .