ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rosendahl Sten - stro <s...@im.se>
Subject RE: loadfile fails on empty file
Date Mon, 16 Dec 2002 15:14:36 GMT
Thanks, that's shorter the using <if> <not> <isset> but it seems harder to
read/maintain though.

Are there any plans to change the behavior of loadfile (empty file -> empty
string, missing file -> unset property)?

Sten

> -----Original Message-----
> From: Dominique Devienne [mailto:DDevienne@lgc.com] 
> Sent: Monday, December 16, 2002 4:05 PM
> To: 'Ant Users List'
> Subject: RE: loadfile fails on empty file
> 
> 
> Just do:
> 
> <loadfile property="xyz" ... />
> <property name="xyz" value="" />
> 
> The latter will be ignore if xyz was already set by loadfile. --DD
> 
> -----Original Message-----
> From: Rosendahl Sten - stro [mailto:stro@im.se] 
> Sent: Monday, December 16, 2002 6:52 AM
> To: 'Ant Users List'
> Subject: loadfile fails on empty file
> 
> I use loadfile to fetch a list of files filtered by 
> replaceregexp. When the list (and file) is empty, the 
> loadfile task will silently *not* set the output property 
> causing an error in the next task. Is there a way of setting 
> it the the empty string, or do I have to test if the property 
> is set or not?
> 
> Sten Rosendahl (stro@im.se)
> IMI Industri-Matematik International - THE ORDER COMPANY  

> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message