ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject Re: includes property not working
Date Wed, 02 Mar 2005 09:59:06 GMT
David,
--- David Resnick <abunetta@gmail.com> 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="${dir.cab.work}"
> 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"
srcFile="ant.delete.txt">
    <filterchain>
      <tokenfilter>
        Here we should do smth like that with regexps
but the line below does not work :((>
        <replaceregex pattern="${ls}" replace=","/>
      </tokenfilter>
      </filterchain>
  </loadfile>

I hope someone from regexp gurus will help you.

Regards Ivan


	
		
__________________________________ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message