ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: includes property not working
Date Wed, 02 Mar 2005 09:59:06 GMT
--- 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:

View raw message