ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: How do I update a property file correctly?
Date Thu, 10 Jul 2003 06:12:25 GMT
Do you know <propert> task?


Jan

> -----Original Message-----
> From: Daniel Joshua [mailto:daniel.joshua@gridnode.com]
> Sent: Thursday, July 10, 2003 5:25 AM
> To: 'Ant Users List'
> Subject: How do I update a property file correctly?
> 
> 
> Hi all,
> 
> Is there a easy way to update a property file correctly?
> 
> This is what I tried:
> 
>     <echo file="timestamp.properties" 
> message="build.timestamp=${timestamp}"
> append="true"/>
> 
> ... the file originally contained ...
> 
>  build.timestamp=20030708-1039
>  setup.timestamp=20030708-1044
> 
> ... but after appending the file contained ...
> 
>  build.timestamp=20030708-1039
>  setup.timestamp=20030708-1044
>  build.timestamp=20030708-1120
> 
> ... instead of what I wanted, which is ...
> 
>  build.timestamp=20030708-1120
>  setup.timestamp=20030708-1044
> 
> Any Suggestions?
> 
> 
> PS: Only way I can think of is to read through all the 
> properties, and to
> write them back without appending, but I find this tedious... 
> especially
> when the property file contains alot of other stuff.
> 
> 
> Regards,
> Daniel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

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