<input>

If you need user interaction in a build, the <input> task provides this facility. It enables you to supply a message to prompt for input, set some valid values so that validation may be performed, and provides a property that will be given the value entered by the user. Table 4.41 lists the attributes of this simple and useful task.

Table 4.41. Table of <input> Attributes
Attributes (Optional) Description
addproperty The property to be set with the value input by the user.
message The message to be displayed as a prompt for input.
validargs A comma-separated list of values to accept as valid input. By default, there is no validation.

Examples

The message prompt can be set via the message attribute or nested within the input task as ...

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.