diff --git a/src/main/org/apache/tools/ant/RuntimeConfigurable.java b/src/main/org/apache/tools/ant/RuntimeConfigurable.java index cdc848b01..9e63ddc97 100644 --- a/src/main/org/apache/tools/ant/RuntimeConfigurable.java +++ b/src/main/org/apache/tools/ant/RuntimeConfigurable.java @@ -339,7 +339,12 @@ public class RuntimeConfigurable implements Serializable { if (configureChildren) { if (child.wrappedObject instanceof Task) { Task childTask = (Task) child.wrappedObject; - childTask.maybeConfigure(); + + // we don't configure tasks of task containers These + // we be configured at the time they are used. + if (!(target instanceof TaskContainer)) { + childTask.maybeConfigure(); + } } else { child.maybeConfigure(p); } diff --git a/src/main/org/apache/tools/ant/UnknownElement.java b/src/main/org/apache/tools/ant/UnknownElement.java index 005216878..d9b5a03f3 100644 --- a/src/main/org/apache/tools/ant/UnknownElement.java +++ b/src/main/org/apache/tools/ant/UnknownElement.java @@ -144,8 +144,7 @@ public class UnknownElement extends Task { // configure attributes of the object and it's children. If it is // a task container, defer the configuration till the task container // attempts to use the task - getWrapper().maybeConfigure(getProject(), - !(realThing instanceof TaskContainer)); + getWrapper().maybeConfigure(getProject()); } /** @@ -305,10 +304,6 @@ public class UnknownElement extends Task { } child.handleChildren(realChild, childWrapper); - -// if (parent instanceof TaskContainer) { -// ((Task) realChild).maybeConfigure(); -// } } } diff --git a/src/main/org/apache/tools/ant/taskdefs/Sequential.java b/src/main/org/apache/tools/ant/taskdefs/Sequential.java index 52a09d685..d362aea33 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Sequential.java +++ b/src/main/org/apache/tools/ant/taskdefs/Sequential.java @@ -82,21 +82,6 @@ public class Sequential extends Task /** Optional Vector holding the nested tasks */ private Vector nestedTasks = new Vector(); - /** - * Override {@link org.apache.tools.ant.Task#maybeConfigure - * maybeConfigure} in a way that leaves the nested tasks - * unconfigured until they get executed. - * - * @since Ant 1.5 - */ - public void maybeConfigure() throws BuildException { - if (isInvalid()) { - super.maybeConfigure(); - } else { - getRuntimeConfigurableWrapper().maybeConfigure(getProject(), false); - } - } - /** * Add a nested task to Sequential. *