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

<clover-setup>
<files>
<patternset>
<exclude name="**/*Utils.java"/>
</patternset>
</files>
</clover-setup>
and
<clover-setup>
<files excludes="com/test/project/web/utils/Utils.java, **/test/project/web/utils/**" />
</clover-setup>

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

This widget could not be displayed.

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!

Regards,

Gabriel

This widget could not be displayed.
There is also another way to define:
<clover-setup>
<files>
<exclude name="**/*EmcUtils.java"/>
</files>
</clover-setup>
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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Canada

AUG Lunch Roundtable - August 13 - Highlights

Thanks to everyone who came out today for the lunch AUG - we had some great food and discussion (and ice cream sandwiches to fend off the heat!) The welcome and fun fact was great as well, what an aw...

28 views 1 3
View post

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