Browse Source

PR 42702 - document replacetoken's support for resources, which was added in 1.8.0

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1538045 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 11 years ago
parent
commit
5e36d6068b
1 changed files with 22 additions and 1 deletions
  1. +22
    -1
      manual/Types/filterchain.html

+ 22
- 1
manual/Types/filterchain.html View File

@@ -574,6 +574,15 @@ user defined values.
<td vAlign=top>Properties file to take tokens from.</td>
<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>&lt;replacetokens&gt;</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>
@@ -626,7 +635,19 @@ This will treat each properties file entry in sample.properties as a token/key p
&lt;/filterreader&gt;
&lt;/filterchain&gt;
&lt;/loadfile&gt;
&lt;/filterchain&gt;
</pre></blockquote>

This reads the properties from an Ant resource referenced by its id:
<blockquote><pre>
&lt;string id=&quot;embedded-properties&quot;&gt;
foo=bar
baz=xyzzy
&lt;/string&gt;
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt;
&lt;filterchain&gt;
&lt;replacetokens propertiesResource=&quot;${ant.refid:embedded-properties}&quot;/&gt;
&lt;/filterchain&gt;
&lt;/loadfile&gt;
</pre></blockquote>

<h3><a name="stripjavacomments">StripJavaComments</a></h3>


Loading…
Cancel
Save