General Metadata—Properties

<properties> [optional] defines some Ant properties that can be referenced elsewhere in project.xml, using the same ${propertyname} syntax as Ant uses. There are two kinds of subelements which may occur (order is significant):

<property name="key">value</property> defines a property key with the value value. Similar to Ant <property name="key" value="value"/>. As with Ant, the value can use other Ant properties defined earlier in <properties>.

<property-file>file.properties</property-file> loads file.properties for its definitions. Similar to Ant <property file="file.properties"/>. The filename can use other Ant properties. As with Ant, the definitions in the file can refer to other Ant properties defined earlier in <properties>; or even other Ant properties defined in file.properties (so long as there is not a cyclic definition, of course).

Some properties are predefined, as in Ant itself, such as Java system properties passed to the IDE. Also the IDE will predefine properties for environment variables: ${env-foo} refers to an environment variable named foo, FOO, Foo, etc.; and ${Env-Foo} refers to an environment variable named exactly Foo. Of course it is usually unwise to rely on such variables in portable build scripts.

The variable ${basedir} (also . in places where a file path is expected) is always defined to be the directory containing the nbproject directory, regardless of any basedir attribute in your Ant script(s):