ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Schmidt <>
Subject [SUBMIT] Input task to read input from during build run. Can exit build or create property from input.
Date Sat, 10 Nov 2001 15:55:13 GMT
Hi ant-dev,

First of all a really big thanks to you guys! I benefit very
much from your work and would like to contribute a little bit
back to this project. It's my first attempt to do so. So
please forbear any mistakes.

Input task allows user interaction during the build process by
displaying a message and reading a line of input from the
console ( The user will need to press the Return key.
The message displayed can be set via the message attribute or
as character data nested into the element.
Optinonally a set of valid imput arguments can be defined via
the validargs attribute. Input task will require the user to
reenter values until the entered value matches one of the
Optionally a set of exit arguments can be defined via the
exitargs attribute. Input task will throw a BuildException with
a customisable exit message if the entered value matches one of
the predefined.
Optionally a property and or userProperty can be created from
the value entered by the user. This property can then be used
during the following build run. Input behaves according to
property task which means that existing properties cannot be

I've developed & tested input task under JDK 1.3.1 and JDK 1.1.8
on a Win 2000 machine.

Originally I developed this task to 'secure' the execution of
certain sql tasks:
  message="All data is going to be deleted from DB. Continue (y/n)?"
  exitmessage="Build abborted by user."/>

Will display the message "All data is going to be deleted from DB
continue (y/n)?" and require 'y+retrun key' to continue build or
'n+return key' to exit build with following message "Build abborted
by user.".

I'd be pleased if you (the commiters) take the time to look at
it and I'd be glad if you like this, too.



Currently I have problems sending mails via so I do
from my account. Receiving mails works.
View raw message