<available>
The <available> task enables you to check the availability of a resource, be it a class, file, directory, or a resource in the JVM. The result of the execution of the task is that a given property will be set (to a value of true by default) if the resource is accessible. Hence, you can execute other tasks on the condition of a resource being available.
Table 4.7 shows the list of attributes associated with this task.
Attributes | Description |
---|---|
Required | |
classname (required if file or resource not given) | The name of the class to check the availability of in the class path. |
file (required if classname of resource not given) | The name of the file whose availability is being checked. |
property |
Get Ant Developer’s Handbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.