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

0 votes
Accepted answer

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 votes
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
Community showcase
Published yesterday in Agile

How Scrum works? It starts with training and education

To answer “How scrum works,” most of the teams I've worked with first addressed the question: “where to start?”  That question applies to both implementation and improvements on the Scrum framew...

144 views 3 5
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