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: Re[2]: How do I update a property file correctly?
Date Thu, 10 Jul 2003 06:36:00 GMT
Sorry, I meant <propertyfile>.


Jan

> -----Original Message-----
> From: dc [mailto:dc@wm.namco.co.jp]
> Sent: Thursday, July 10, 2003 8:26 AM
> To: Ant Users List
> Subject: Re[2]: How do I update a property file correctly?
> 
> 
> you could also have a template properties file that you copy and
> overwrite each time... means doing it at start and end of 
> your build but
> gives control...
> 
> 
> in your template template.props
> 	build.timestamp=@TIMESTAMP@
> 
> 
> <copy  todir="${template}">
>     <fileset dir="${common.dir}/res/" includes="template.*" />
>         <filterchain>
>             <filterreader 
> classname="org.apache.tools.ant.filters.ReplaceTokens">
>                 <param type="token" name="TIMESTAMP"
> value="${timestamp}"/>
> 
> etc.
> 
> from [ Jan.Materne@rzf.fin-nrw.de ] on [ Thu, 10 Jul 2003 
> 08:12:25 +0200 ]
> 
> >   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
> >   > 
> 
> /dc
> +-----+-----------------------------------------+
> david [dc] collier
> 
> NAMCO Ltd.
> Web & Mobile Contents Business Group
> 
>   e   |   dc@wm.namco.co.jp
>   v   |  +81(0)90 7414 6107
> 
> 
> ---------------------------------------------------------------------
> 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