You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

loadproperties.html 1.5 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <html>
  2. <head>
  3. <title>LoadProperties Task</title>
  4. </head>
  5. <body>
  6. <h2><a name="loadproperties">LoadProperties</a></h2>
  7. <h3>Description</h3>
  8. <p>
  9. Load a file's contents as Ant properties. This is equivalent
  10. to &lt;property file=&quot;...&quot;/&gt; except that it
  11. supports nested &lt;filterchain&gt; elements and it cannot be
  12. specified outside a target.
  13. </p>
  14. <h3>Parameters</h3>
  15. <table border="1" cellpadding="2" cellspacing="0">
  16. <tr>
  17. <td valign="top"><b>Attribute</b></td>
  18. <td valign="top"><b>Description</b></td>
  19. <td align="center" valign="top"><b>Required</b></td>
  20. </tr>
  21. <tr>
  22. <td valign="top">srcFile</td>
  23. <td valign="top">source file</td>
  24. <td valign="top" align="center">Yes</td>
  25. </tr>
  26. </table>
  27. <p>
  28. The LoadProperties task supports nested <a href="../CoreTypes/filterchain.html">
  29. FilterChain</a>s.
  30. <h3>Examples</h3>
  31. <pre> &lt;loadproperties srcFile="file.properties" /&gt;
  32. </pre>
  33. Load contents of file.properties as Ant properties.
  34. <pre> &lt;loadproperties srcFile="file.properties"&gt;
  35. &lt;filterchain&gt;
  36. &lt;<a href="../CoreTypes/filterchain.html#linecontains">linecontains</a>&gt;
  37. &lt;contains value="import.&quot;/&gt;
  38. &lt;linecontains/&gt;
  39. &lt;/filterchaint&gt;
  40. &lt;/loadproperties&gt;
  41. </pre>
  42. Read the lines that contain the string &quot;import.&quot;
  43. from the file &quot;file.properties&quot; and load them as
  44. Ant properties.
  45. <hr>
  46. <p align="center">Copyright &copy; 2002 Apache Software Foundation. All rights
  47. Reserved.</p>
  48. </body>
  49. </html>