ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: How to insert properties into a file?
Date Tue, 08 Apr 2008 01:33:28 GMT
Take a look at the FilterSet type:
<http://ant.apache.org/manual/CoreTypes/filterset.html>.

This will do exactly what you're looking for. Default begin and end
tokens are "@", but you might be able to use "${" and "}" for mapping.

On Mon, Apr 7, 2008 at 7:25 PM, coltsith <dhengi_wave2@yahoo.com> wrote:
>
>  Hi,
>
>  I have a file of string properties and I need to be able to insert ant
>  properties into it where referenced. So, for example:
>
>  #########
>  text.file
>  #########
>  app.version=${version}
>  app.name=${name}
>  app.author=John Doe
>
>  #########
>  props.file
>  #########
>  version=4
>  name=My Application
>
>  I need a task or way to provide a property file and replace all occurrences
>  with the corresponding property in a given text file. So a command like
>  this:
>
>  <replacePropertiesInFile file="text.file" propertyDefinitions="props.file"/>
>
>  Is there anything like this?
>
>  Thanks in advance!
>  --
>  View this message in context: http://www.nabble.com/How-to-insert-properties-into-a-file--tp16542616p16542616.html
>  Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>  For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message