Chapter 14. UID
Prev | Additional Ant Tasks | Next

## Chapter 14. UID

The UID task generates a unique ID. This ID may be either a unique string or integer.

To use this task in your build files, include a task definition like this:

        <taskdef name="uid" classname="ise.antelope.tasks.UIDTask"/>

Table 14.1. UID Task Attributes

Attribute | Description | Default | Required
--- | --- | --- | ---
name | Name of a property to store the unique ID. | None | Yes
int | If true, generate a unique integer. | false | No

Examples:

    <uid name="uid_1"/>
    <echo>uid_1 = ${uid_1}</echo>
    <uid name="uid_2" int="yes"/>
    <echo>uid_2 = ${uid_2}</echo>

         [echo] uid_1 = -4a1a8b86:10728498757:-7fff
         [echo] uid_2 = 2

Prev | Up | Next
Chapter 13. StringUtils | Home | Chapter 15. Math