Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
fileset includes and excludes precedence

fileset includes and excludes precedence

2005-06-22       - By Bijo Alex Thomas
Reply:     1     2  

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.

Regards,
Bijo

_________________________________
Bijo Alex Thomas
DSRC, 6, Smith Road, Chennai - 2
Mail: bijoalex@(protected)
Website: http://dsrc.com


----- Original Message -----
From: "Eric Wood" <ewood@(protected)>
To: <user@(protected)>
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
applied?


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

Eric Wood
ewood@(protected)
207.552.2306





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.