You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2013/11/01 21:02:09 UTC
svn commit: r1538045 - /ant/core/trunk/manual/Types/filterchain.html
Author: bodewig
Date: Fri Nov 1 20:02:08 2013
New Revision: 1538045
URL: http://svn.apache.org/r1538045
Log:
PR 42702 - document replacetoken's support for resources, which was added in 1.8.0
Modified:
ant/core/trunk/manual/Types/filterchain.html
Modified: ant/core/trunk/manual/Types/filterchain.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/manual/Types/filterchain.html?rev=1538045&r1=1538044&r2=1538045&view=diff
==============================================================================
--- ant/core/trunk/manual/Types/filterchain.html (original)
+++ ant/core/trunk/manual/Types/filterchain.html Fri Nov 1 20:02:08 2013
@@ -575,6 +575,15 @@ user defined values.
<td vAlign=top align="center">No</td>
</tr>
<tr>
+ <td vAlign=top>Not applicable.</td>
+ <td vAlign=top>propertiesResource</td>
+ <td vAlign=top>Properties resource to take tokens from.
+ Note this only works is you use the
+ "convenience" <code><replacetokens></code> syntax.
+ <em>since Ant 1.8.0</em></td>
+ <td vAlign=top align="center">No</td>
+ </tr>
+ <tr>
<td vAlign=top>User defined String.</td>
<td vAlign=top>value</td>
<td vAlign=top>Replace-value for the token</td>
@@ -626,7 +635,19 @@ This will treat each properties file ent
</filterreader>
</filterchain>
</loadfile>
-</filterchain>
+</pre></blockquote>
+
+This reads the properties from an Ant resource referenced by its id:
+<blockquote><pre>
+<string id="embedded-properties">
+foo=bar
+baz=xyzzy
+</string>
+<loadfile srcfile="${src.file}" property="${src.file.replaced}">
+ <filterchain>
+ <replacetokens propertiesResource="${ant.refid:embedded-properties}"/>
+ </filterchain>
+</loadfile>
</pre></blockquote>
<h3><a name="stripjavacomments">StripJavaComments</a></h3>