2002-03-06 03:25:51 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>LoadProperties Task</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
<h2><a name="loadproperties">LoadProperties</a></h2>
|
|
|
|
<h3>Description</h3>
|
|
|
|
<p>
|
|
|
|
Load a file's contents as Ant properties. This is equivalent
|
|
|
|
to <property file="..."/> except that it
|
|
|
|
supports nested <filterchain> elements and it cannot be
|
|
|
|
specified outside a target.
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td valign="top"><b>Attribute</b></td>
|
|
|
|
<td valign="top"><b>Description</b></td>
|
|
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">srcFile</td>
|
|
|
|
<td valign="top">source file</td>
|
|
|
|
<td valign="top" align="center">Yes</td>
|
|
|
|
</tr>
|
2002-07-19 17:48:36 +00:00
|
|
|
<tr>
|
|
|
|
<td valign="top">encoding</td>
|
|
|
|
<td valign="top">encoding to use when loading the file</td>
|
|
|
|
<td align="center" valign="top">No</td>
|
|
|
|
</tr>
|
2002-03-06 03:25:51 +00:00
|
|
|
</table>
|
|
|
|
<p>
|
|
|
|
The LoadProperties task supports nested <a href="../CoreTypes/filterchain.html">
|
|
|
|
FilterChain</a>s.
|
|
|
|
|
|
|
|
<h3>Examples</h3>
|
2002-09-04 11:05:19 +00:00
|
|
|
<pre> <loadproperties srcFile="file.properties"/>
|
2002-03-06 03:25:51 +00:00
|
|
|
</pre>
|
|
|
|
Load contents of file.properties as Ant properties.
|
|
|
|
|
|
|
|
<pre> <loadproperties srcFile="file.properties">
|
|
|
|
<filterchain>
|
|
|
|
<<a href="../CoreTypes/filterchain.html#linecontains">linecontains</a>>
|
|
|
|
<contains value="import."/>
|
|
|
|
<linecontains/>
|
|
|
|
</filterchaint>
|
|
|
|
</loadproperties>
|
|
|
|
</pre>
|
|
|
|
Read the lines that contain the string "import."
|
|
|
|
from the file "file.properties" and load them as
|
|
|
|
Ant properties.
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<p align="center">Copyright © 2002 Apache Software Foundation. All rights
|
|
|
|
Reserved.</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|