ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Resnick" <>
Subject RE: includes property not working
Date Thu, 03 Mar 2005 05:01:26 GMT
Thanks for your suggestion! You are right, this would improve the
readability of the list file. But I'm still wondering why the property is
not working...

-----Original Message-----
From: Ivan Ivanov [] 
Sent: Wednesday, March 02, 2005 11:59
To: Ant Users List
Subject: Re: includes property not working

--- David Resnick <> wrote:

> I'm trying to include a list of files to delete in a
> text file which is read
> into a property (with properties expansion) and then
> used in the includes
> property of a fileset in a delete task. For some
> reason when there are line
> breaks in the text file, this isn't working!
> 		<loadfile property="to.delete"
> srcFile="ant.delete.txt">
> 			<filterchain>
> 				<expandproperties />
> 			</filterchain>
> 		</loadfile>
> 		<delete quiet="false" verbose="true"
> includeEmptyDirs="true">
> 			<fileset dir="${}"
> includes="${to.delete}" />
> 		</delete>
> If the list in the text file is separated by commas,
> it works fine.

I would recommend you to replace the line breaks in
your file with commas. I tried to do it with regular
expression, but I am not good at them. Here is my
unsuccessfull attempt:
  <loadfile property="to.delete"
        Here we should do smth like that with regexps
but the line below does not work :((>
        <replaceregex pattern="${ls}" replace=","/>

I hope someone from regexp gurus will help you.

Regards Ivan

Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web

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

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

View raw message