ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bijo Alex Thomas" <>
Subject Re: fileset includes and excludes precedence
Date Wed, 22 Jun 2005 18:15:54 GMT
If you don't want anything under "src" directory to be copied, then it's
exclude.list=**/src/** that you have to use and not exclude.list=**/src/*

The later will only exclude files immediately under "src", but anything
deeper under "src" will be not be excluded.

Regarding include/exclude precedence, exclude has higher precedence than
include. So you can consider it as follows,
Ant will create a set files based on the include pattern ('**' by default)
Then exclude pattern (if any) will be applied on this set.


Bijo Alex Thomas
DSRC, 6, Smith Road, Chennai - 2

----- Original Message -----
From: "Eric Wood" <>
To: <>
Sent: Wednesday, June 22, 2005 10:15 PM
Subject: fileset includes and excludes precedence

I have a copy task that uses a fileset with "includes" and "excludes"
values set as properties. As it turns out, the include list is wildcarded to
include all files under the dir, but the excludes is set to exculde all
files under a "src" directory. include.list=**/* excludes=**/src/*

This task is in a generic copy target that is part of  a "higher" level
build script that is imported iby lower level scripts.

What I see is that the includes takes affect regardless of the excludes. How
does filset handles the reults of both parameters? Is there a precedence

<copy todir="${dir.deploy}/${artifact}" verbose="true">
                    <fileset dir="${dir.src}" includes="${include.list}
excludes=${exclude.list}" />

Eric Wood

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message