ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: Using property file to store a list
Date Fri, 19 Sep 2008 17:20:34 GMT
Do you really mean a properties file?  e.g.


Then you can simply use <fileset dir="wheretolook"
includes="${filestoinclude}" /> after loading the
properties file.

If you actually mean a separate file containing only
the names of the files to include, you'd use an
includesfile with <fileset> (common basedir/relative
paths) or <files> (absolute paths).  Note that these
are one pattern per line, however, and don't support
comments (If you needed to support comments, you could
<concat> and filter the original).  If you really need
a single line containing comma-delimited files, you
could filter that to an includesfile as well.  The
good thing about includesfiles is that you can use
them to specify paths with whitespace; IIRC you can't
do that with <fileset|files>' includes attribute.


--- Nan Null <> wrote:

> Hi, I need to provide a fileset in ANT that is
> customizable by the
> developers.  To do that, I am thinking of a
> customized property file
> for each developer to put in the list of files for
> the fileset.  My
> question is how do I have this in the property file?
>  I am thinking of
> a comma separated property.  Then how do I turn this
> single value with
> comma separated into a fileset inside ANT?  Is there
> another method?
> If not, please give me a hint on write some custom
> code to make this a
> fileset.  I am not asking on how to split a string
> here.  I mean to
> ask for how to extends ANT so I can have a
> customized fileset like
> this.  Thanks.
> To unsubscribe, e-mail:
> For additional commands, e-mail:


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

View raw message