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

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

Anuj April 16, 2012

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

0 votes
Answer accepted
Gabriel Wagner December 17, 2012

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

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2012
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
TAGS
AUG Leaders

Atlassian Community Events