ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject [FER] Interactive Builds
Date Fri, 10 Aug 2001 21:02:57 GMT
(FER = Feature Enhancement Request)

It would be beneficial in some circumstances to have an interactive build.
On the Avalon project we use Ant to automate just about everything that can
be automated, including most parts of making a release.  We automatically
generate our email announcement text, our Jakarta news entry, and our
distribution HEADER.html files using Ant.

There are times when we want to embed information in the announcement that
would be for a particular release (such as the reasons for upgrading, etc).
It would be beneficial to have Ant ask for the user input and embed that
input into a property.  The task would look something like this:

<user-input property="">
  <prompt>What is the name of your DataSource?</prompt>
    <not-empty message="You must specify a name"/>

<user-input property="informix.driver">
  <prompt>Please input the path to your Informix Driver?</prompt>
    <default value="/www/jakarta/etc"/>

The <prompt/> element and the "property" attribute would always be required.
If there is a <check/> element (optional) then the input would have to match
some *simple* criteria.  Valid constraints would be:

Constraint Name        Action
---------------        ------
not-empty              Checks the user input for a string that contains more
                       than white space.  If "message" attribute is present
                       and the input fails this constraint, display message,
                       and prompt again for user input.

valid-path             Checks the user input for a valid path.  If the input
                       is empty or is not a valid path then do not define the
                       property.  (If "not-empty" is present as well, then
                       failure of this constraint constitutes an empty input).

default                Checks the user input for the same criteria as "not-empty"
                       but places the value in the mandatory "value" attribute
                       in the property if the input fails this constraint.

These constraints should be all that would be expected of a build system.  This
also allows Ant to be used as a "poor man's" installer package.

View raw message