Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#198 Add file support to properties...

open
nobody
Core (30)
5
2011-06-05
2011-06-05
Anonymous
No

Add the file attribute support to the <property> element. Other XAnt (Ant-derived) tools support this and it makes it possible to import properties in a simple format into the build system:

For instance if you had a file named foo.properties with the following properties defined in it:
foo.bar=MyFooBar
foo.baz=MyFooBaz

You could load it into the NAnt build script by calling the following:
<property file="foo.properties" />

Importantly, if one has multiple imported properties files (e.g. foo.properties and foo.overrides) that define the same set of properties if we define the foo.overrides file after the foo.properties files, e.g.:
<property file="foo.properties" />
<property file="foo.overrides" />

The property values in the overrides file will replace what was imported from foo.properties.

Discussion