PropertySet

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. No; default is true
negate Whether to negate results. If true, all properties not selected by nested elements will be returned. Since Ant 1.6.2 No; default is false
refid Makes this propertyset a reference to a propertyset defined elsewhere. If specified no other attributes or nested elements are allowed. No

Parameters specified as nested elements

propertyref

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).

propertyset

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

For example:

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

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

mapper

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*"/>
</propertyset>

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.