|
|
@@ -585,9 +585,14 @@ user defined values. |
|
|
|
<h4>Example:</h4> |
|
|
|
|
|
|
|
This replaces occurrences of the string @DATE@ in the data |
|
|
|
with today's date and stores it in the property ${src.file.replaced} |
|
|
|
with today's date and stores it in the property ${src.file.replaced}. |
|
|
|
<blockquote><pre> |
|
|
|
<tstamp/> |
|
|
|
<!-- just for explaining the use of the properties --> |
|
|
|
<property name="src.file" value="orders.csv"/> |
|
|
|
<property name="src.file.replaced" value="orders.replaced"/> |
|
|
|
|
|
|
|
<!-- do the loading and filtering --> |
|
|
|
<loadfile srcfile="${src.file}" property="${src.file.replaced}"> |
|
|
|
<filterchain> |
|
|
|
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens"> |
|
|
@@ -595,6 +600,9 @@ with today's date and stores it in the property ${src.file.replaced} |
|
|
|
</filterreader> |
|
|
|
</filterchain> |
|
|
|
</loadfile> |
|
|
|
|
|
|
|
<!-- just for explaining the use of the properties --> |
|
|
|
<echo message="${orders.replaced}"/> |
|
|
|
</pre></blockquote> |
|
|
|
|
|
|
|
Convenience method: |
|
|
|