A <files> with <includesfile> or <excludesfile> ignores patterns

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

A <fileset> tag in Clover's task, such as <clover-setup> or <clover-report>, contains definitions of inclusion/exclusion patterns using the <includesfile> / <excludesfile> tags. For example:

<clover-setup>
   <files>
      <includesfile name="setup.includes"/>
      <excludesfile name="setup.excludes"/>
   </files>
</clover-setup>

When running Clover's task, it looks as if these patterns are being ignored - either all of them or only some of them.

 

Cause

Ant does not trim whitespace from patterns defined in an external file. Furthermore, Ant does not warn if any whitespace character is found at the beginning or the end of a line. Which means that if you accidentally append, let's say a space character at the end, it becomes a part of a pattern and causes that files are not matched properly.

 

Resolution

Make sure that you have no leading/trailing whitespaces in your file(s) containing patterns.

 

Last modified on Dec 31, 2014

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.