Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Separating out instrumented code and class files with Clover for Ant

Is it possible for Clover for Ant to generate instrumented source and class files into a separate directory from the uninstrumented files ? While searching the documentation I found references for enabling this with the IDE plugins, but not for the Ant targets.

I need to know whether this is possible in order to determine whether we can include Clover in our continuous integration builds, or whether we should create separate code coverage builds to generate the Clover data.

1 answer

1 accepted

0 votes
Answer accepted

Yes. You can use the clover-instr task for this purpose, for example:

<clover-instr srcdir="src" destdir="instr"/>

Thanks. We ended up giving up on Clover in favour of Cobertura, since Clover's method of instrumenting source as well as classes was too disruptive to our build system.

Cobertura is quite good, although due to the bytecode instrumentation, it's less capable than Clover. Would you mind telling us what was "too disruptive" with Clover?

Sure - our Ant build system was set up to use EMMA for code coverage, which as you know only instruments byte code; it was pretty easy to separate out the instrumented classes for running tests while using non-instrumented classes for the distribution. With Clover, we had trouble filtering out instrumented classes from our distribution because it instruments the source as well, and so some of our compiled classes ended up with instrumentation in them. I'm sure we could have resolved this, but we felt it wasn't worth the effort since we get nearly all the features we need with Cobertura, for free. We've also been able to extend Cobertura for some custom requirements, since it's open source.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

147 views 1 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you