Tasks in task containers are not configured until they are used. Other elements in Task containers (which is now supported by 1.6) will be configured when the task container itself is configured. Remove override in Sequential as it is no longer necessary git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274370 13f79535-47bb-0310-9956-ffa450edef68master
@@ -339,7 +339,12 @@ public class RuntimeConfigurable implements Serializable { | |||||
if (configureChildren) { | if (configureChildren) { | ||||
if (child.wrappedObject instanceof Task) { | if (child.wrappedObject instanceof Task) { | ||||
Task childTask = (Task) child.wrappedObject; | 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 { | } else { | ||||
child.maybeConfigure(p); | child.maybeConfigure(p); | ||||
} | } | ||||
@@ -144,8 +144,7 @@ public class UnknownElement extends Task { | |||||
// configure attributes of the object and it's children. If it is | // configure attributes of the object and it's children. If it is | ||||
// a task container, defer the configuration till the task container | // a task container, defer the configuration till the task container | ||||
// attempts to use the task | // 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); | child.handleChildren(realChild, childWrapper); | ||||
// if (parent instanceof TaskContainer) { | |||||
// ((Task) realChild).maybeConfigure(); | |||||
// } | |||||
} | } | ||||
} | } | ||||
@@ -82,21 +82,6 @@ public class Sequential extends Task | |||||
/** Optional Vector holding the nested tasks */ | /** Optional Vector holding the nested tasks */ | ||||
private Vector nestedTasks = new Vector(); | 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. | * Add a nested task to Sequential. | ||||
* <p> | * <p> | ||||