diff --git a/WHATSNEW b/WHATSNEW index 04a413545..e65f11bf5 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -34,6 +34,11 @@ Changes that could break older environments: now - and we'd like to know about it. The current set of tasks is supposed to work with any version of VAJ starting with 3.0. +* will no longer prompt the user and wait for input if the + addproperty attribute is set to a property that has already been + defined in the project. If you rely on the task waiting for input, + don't use the addproperty attribute. + Fixed bugs: ----------- * Filter readers were not handling line endings properly. Bugzilla diff --git a/docs/manual/CoreTasks/input.html b/docs/manual/CoreTasks/input.html index 2f8580ab5..2209c6274 100644 --- a/docs/manual/CoreTasks/input.html +++ b/docs/manual/CoreTasks/input.html @@ -24,7 +24,10 @@ one of the predefined.

Optionally a property 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 overriden.

+task which means that existing properties cannot be overriden. +Since Ant 1.6, <input> will not prompt for input if +a property should be set by the task that has already been set in the +project (and the task wouldn't have any effect).

Parameters

diff --git a/src/main/org/apache/tools/ant/taskdefs/Input.java b/src/main/org/apache/tools/ant/taskdefs/Input.java index 64d68dd20..be7d7643c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Input.java +++ b/src/main/org/apache/tools/ant/taskdefs/Input.java @@ -137,6 +137,12 @@ public class Input extends Task { * @exception BuildException */ public void execute () throws BuildException { + if (addproperty != null + && getProject().getProperty(addproperty) != null) { + log("skipping " + getTaskName() + " as property " + addproperty + + " has already been set."); + } + InputRequest request = null; if (validargs != null) { Vector accept = StringUtils.split(validargs, ',');