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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • 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
  • Community
  • Products
  • Clover
  • Questions
  • We are Evaluating Clover for code coverage for future puchase and want to use the exclude files option. But it is not working.

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

0 votes
Answer 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!

Regards,

Gabriel

0 votes
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
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...

178 views 2 9
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