|
How to use LoadProperties task |
|
Description
Load a file's contents as Ant properties. This is equivalent
to <property file|resource="..."/> except that it
supports nested <filterchain> elements.
If you want to simulate property's
prefix attribute, please use prefixlines
filter.
Parameters
| Attribute |
Description |
Required |
| srcFile |
source file |
One of these |
| resource |
the resource name of the property file |
| encoding |
encoding to use when loading the file |
No |
| classpath |
the classpath to use when looking up a resource. |
No |
| classpathref |
the classpath to use when looking up a resource,
given as reference
to a <path> defined elsewhere.. |
No |
The LoadProperties task supports nested
FilterChains, as well as a nested <classpath>
element for use with the resource attribute.
Examples
<loadproperties srcFile="file.properties"/>
Load contents of file.properties as Ant properties.
<loadproperties srcFile="file.properties">
<filterchain>
<linecontains>
<contains value="import."/>
</linecontains>
</filterchain>
</loadproperties>
Read the lines that contain the string "import."
from the file "file.properties" and load them as
Ant properties.
Source: Apache Ant
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.