We are Evaluating Clover for code coverage for future puchase and want to use the exclude files option. But it is not working.

I wanted to exclude certain files/packages from getting instrumented in clover.

Used following different entries in build.xml

<exclude name="**/*Utils.java"/>
<files excludes="com/test/project/web/utils/Utils.java, **/test/project/web/utils/**" />

But the file Utils.java and others in the package are still getting instrumented.

Using Cloverfor ant version 3.1.4.

2 answers

1 accepted

Hi Anuj!

I'm a little late to answer I was just dealing with the same problem that you did. I also use the correct excludes and it was instrumenting every class.

The problem was that I was using ant or antcall, just add to the call the property "inheritrefs" in "true".

&lt;ant target="build" inheritrefs="true" /&gt;

Hope this helps!



0 vote
There is also another way to define:
<exclude name="**/*EmcUtils.java"/>
ALL three versions work correctly. So I guess you must be calling wrong Ant targets (e.g having clover-instrument defined as well).

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

71 views 0 11
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you