Apache Ant TasksLoadPropertiesLoadPropertiesDescriptionLoad a file's contents as Apache Ant properties. This is equivalentto <property file|resource="..."/> except that itsupports nested <filterchain> elements.Also if the file is missing, the build is halted with an error, ratherthan a warning being printed. Note: the default value of thistask's prefixValues attribute is different from thedefault value of the same attribute inthe <property> task. Parameters Attribute | Description | Required | srcFile | source file | One of these or a nested resource | 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 | prefix | Prefix to apply to loaded properties; a "." is appended to the prefix if not specified. Since Ant 1.8.1 | No | prefixValues | Whether to apply the prefix when expanding the right hand side of the properties. Since Ant 1.8.2 | No (default=true) | Parameters specified as nested elementsany resource or single elementresource collectionThe specified resource will be used as src. Since Ant 1.7 classpathfor use with the resource attribute. Examples <loadproperties srcFile="file.properties"/> or <loadproperties> <file file="file.properties"/> </loadproperties> 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 asAnt properties. <loadproperties> <gzipresource> <url url="http://example.org/url.properties.gz"/> </gzipresource> </loadproperties> Load contents of http://example.org/url.properties.gz, uncompress iton the fly and load the contents as Ant properties. |