From 5e36d6068b788f5b15d1cebe6909295620541255 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 1 Nov 2013 20:02:08 +0000 Subject: [PATCH] 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 --- manual/Types/filterchain.html | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/manual/Types/filterchain.html b/manual/Types/filterchain.html index 3f62286d0..b7c95a189 100644 --- a/manual/Types/filterchain.html +++ b/manual/Types/filterchain.html @@ -574,6 +574,15 @@ user defined values. Properties file to take tokens from. No + + Not applicable. + propertiesResource + Properties resource to take tokens from. + Note this only works is you use the + "convenience" <replacetokens> syntax. + since Ant 1.8.0 + No + User defined String. value @@ -626,7 +635,19 @@ This will treat each properties file entry in sample.properties as a token/key p </filterreader> </filterchain> </loadfile> -</filterchain> + + +This reads the properties from an Ant resource referenced by its id: +
+<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>
 

StripJavaComments