The macro is used to exit an Ant script cleanly, without generating a build exception. It must be invoked in the top-level section of the script and be passed the name of the exit-target for the script.

forces an Ant script to exit by setting the script’s default target to the specified exit-target. An exit-target is an Ant script target with no processing and no prerequisites; the depends attribute is not specified or empty. Reseting the default target to an empty target at the top-level of the script causes the script to simply exit without processing any functional targets.

The macro can be used to control the processing flow of called Ant scripts. For example, an Ant script can be made optional by including at the top-level of the script and triggering its execution based on some condition.

Attributes

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

Macro Specific Attributes
Attribute Description Required
target Name of the exit-target for the script. The default exit-target name is end. No
message Message text to be logged when the macro is invoked and verbose logging is enabled. The default message text is: Exiting ${ant.project.name} by request. No

Notes

Examples