ANT MultipleChoiceInputRequest  
Author Message
spamjon





PostPosted: 2003-11-6 1:36:00 Top

java-programmer, ANT MultipleChoiceInputRequest I have a target that checks if backup directories exist and if so, it
asks the user for input. I'd like to minimize the amount of typing the
user has to do and present the user with a list of choices that they
can just enter the number of the option they want.

Using the default inputhandler works fine, but it's not very elegant.
I've read (very little) about
org.apache.tools.ant.input.MultipleChoiceInputRequest, but I can't
find anything on the Internet or in the manual. I'd like to see how
this works, as I may need to use this elsewhere. Anyone ever tried it?

I'm using Ant 1.5.1 on Windows 2000.

Jon
email***@***.com

--- Begin sample code ---

<target name="restore">

... Code to check for backup goes here ...

<input
message="Please select the backup directory to restore:
backup, backup1, backup2 "
validargs="backup,backup1,backup2"
addproperty="do.backup"
/>
<antcall target="restore-backup" />
</target>

<target name="restore-backup" >
... Code to restore do.backup goes here ...
</target>

--- End sample code ---