The task returns the next integer value of the macro counter. The task is thread safe and will always return a unique next integer value for the life of the build.

Attributes

The task supports Build Extensions Debugging Attributes, as well as, its own task specific attributes. Click on a link for more information on the common attributes.

The following table describes the task specific attributes for the task:

Task Specific Attributes
Attribute Description Required
property Name of the Ant property in which to return the value. Yes
verbose Specifies more message output. The default is false. No

Notes

Examples

Create a uniquely named property

<macrodef name="NewProperty">
  <attribute name="counter"/>
  <attribute name="name"/>
  <attribute name="value"/>
  <sequential>
    <property name="@{name}.@{counter}" value="@{value}"/>
  </sequential>
</macrodef>

<target name="main">
  <xt:getnextmacrocounter property="current"/>
  <NewProperty counter="${current}" name="my.property" value="my.value"/>
</target>