Load a file's contents as Ant properties. This is equivalent to <property file="..."/> except that it supports nested <filterchain> elements.

If you want to simulate property's prefix attribute, please use prefixlines filter.


Attribute Description Required
srcFile source file Yes
encoding encoding to use when loading the file No

The LoadProperties task supports nested FilterChains.


    <loadproperties srcFile="file.properties"/>
Load contents of file.properties as Ant properties.
    <loadproperties srcFile="file.properties">
          <contains value="import."/>
Read the lines that contain the string "import." from the file "file.properties" and load them as Ant properties.

Copyright © 2002-2004 The Apache Software Foundation. All rights Reserved.