Since Apache Ant 1.6

Groups a set of properties to be used by reference in a task that supports this.

Attribute Description Required
dynamic Whether to reevaluate the set every time the set is used. Default is "true". No
negate Whether to negate results. If "true", all properties not selected by nested elements will be returned. Default is "false". Since Ant 1.6.2 No

Parameters specified as nested elements


Selects properties from the current project to be included in the set.

Attribute Description Required
name Select the property with the given name. Exactly one of these.
prefix Select the properties whose name starts with the given string.
regex Select the properties that match the given regular expression. Similar to regexp type mappers, this requires a supported regular expression library.
builtin Selects a builtin set of properties. Valid values for this attribute are all for all Ant properties, system for the system properties and commandline for all properties specified on the command line when invoking Ant (plus a number of special internal Ant properties).


A propertyset can be used as the set union of more propertysets.

For example:

<propertyset id="properties-starting-with-foo">
  <propertyref prefix="foo"/>
<propertyset id="properties-starting-with-bar">
  <propertyref prefix="bar"/>
<propertyset id="my-set">
  <propertyset refid="properties-starting-with-foo"/>
  <propertyset refid="properties-starting-with-bar"/>

collects all properties whose name starts with either "foo" or "bar" in the set named "my-set".


A mapper - at maximum one mapper can be specified. The mapper is used to change the names of the property keys, for example:

<propertyset id="properties-starting-with-foo">
  <propertyref prefix="foo"/>
  <mapper type="glob" from="foo*" to="bar*"/>

collects all properties whose name starts with "foo", but changes the names to start with "bar" instead.

If supplied, the nested mapper will be applied subsequent to any negation of matched properties.