ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Sauyet <li...@sauyet.com>
Subject Re: Combining static file with <echoproperties> results
Date Wed, 04 Jan 2006 16:20:45 GMT
 >> = Scott Sauyet <lists@sauyet.com>
 > = Benjamin Burgess <BBurgess@tiaa-cref.org>

 >> Can anyone suggest a way of combining the information from one file
 >> with the results of an <echoproperties> that doesn't involve a
 >> temporary file.  I'm doing it now using one, but that grates on me,
 >> and I feel there must be a simple way of doing so.

 > Using Ant-Contrib (not recommended unless necessary) you can do it
 > like this:
 >
 > <propertyselector property="app.properties.list"
 >     delimiter=","
 >     match="app\.(.*)"
 >     select="\1"/>
 >
 > <for list="${app.properties.list}" param="prop">
 >     <sequential>
 >         <propertycopy property="@{prop}.value" from="app.@{prop}"/>
 >         <propertyfile file="${class.dir}/app.properties">
 >             <entry key="@{prop}" value="${@{prop}.value}"/>
 >         </propertyfile>
 >      </sequential>
 > </for>

Thanks.  I haven't ever used Ant-Contrib.  This makes sense, but since 
this is just an itch I'd like to scratch, I think I'll stick with your 
"not recommended unless necessary."

If there are any suggestions that don't use Ant-Contrib, I'd love to 
hear them.

Thanks again,

   -- Scott


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


Mime
View raw message