In Apache Ant, you can use the Input task in build.xml to accept user input. Check out the following illustration.
Eg:
Eg:
As you see in the Input task, we specify the message that should get displayed asking for user input.
The user input is then stored in a property named "my-name" in this case.
The valid arguments i.e the valid options are mentioned in the validargs parameter.
A detailed technote can be read here.