You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Sh...@lotus.com on 2000/11/30 14:21:56 UTC

Re: Prompt task - make sure it times out to default value if no input

My only comment would be to have the *default* behavior (for any end-user
environment, whether it be System.in/System.out, Antidote, or whatever) to
timeout after some number of seconds if no input is given; in this case,
the default attribute is used.  This will allow unattended builds to
continue to run even if a <prompt> element somehow gets into them.  I think
this is important since this is a significant shift to build files for Ant:
interactivity while Ant is running the build.

Otherwise I like it! It needs better doc though (as I'm sure the list will
come to consensus on).  I'm not completely clear on the difference between
the expect and default attributes?
Also, I'd be sure to make it clear exactly what the property gets set to:
you might want to have separate tasks, or at least a separate attribute,
for boolean properties (that get set to true or not) versus string value
properties (which get set to whatever string the user enters). This is
important both to make it easier to use this task, as well as to make it
simpler to parse the user input: for boolean properties, just hard code it
to (perhaps) be y|Y for true, anything else for false; string properties
take whatever's typed in.

---- you <bo...@apache.org> wrote: ----
> I've been thinking about a prompt or ask like task, something like
>
> <prompt alternatives="y,n" expect="y" default="y" property="abort">
> JUnit not found. If you continue, you'll be unable to run tests.
> Abort?</prompt>

- Shane
Xalan testing & Ant-master guy