Return-Path: Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Delivered-To: mailing list dev@ant.apache.org Received: (qmail 32613 invoked by uid 500); 2 Apr 2003 11:43:44 -0000 Received: (qmail 32610 invoked from network); 2 Apr 2003 11:43:43 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 2 Apr 2003 11:43:43 -0000 Received: (qmail 5466 invoked by uid 1142); 2 Apr 2003 11:43:42 -0000 Date: 2 Apr 2003 11:43:42 -0000 Message-ID: <20030402114342.5465.qmail@icarus.apache.org> From: conor@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Sequential.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N conor 2003/04/02 03:43:41 Modified: src/main/org/apache/tools/ant RuntimeConfigurable.java UnknownElement.java src/main/org/apache/tools/ant/taskdefs Sequential.java Log: Tweak the handling of config of tasks in task containers. 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 Revision Changes Path 1.28 +6 -1 ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java Index: RuntimeConfigurable.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -w -u -r1.27 -r1.28 --- RuntimeConfigurable.java 2 Apr 2003 06:24:34 -0000 1.27 +++ RuntimeConfigurable.java 2 Apr 2003 11:43:41 -0000 1.28 @@ -339,7 +339,12 @@ if (configureChildren) { if (child.wrappedObject instanceof Task) { Task childTask = (Task) child.wrappedObject; + + // 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); } 1.44 +1 -6 ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -w -u -r1.43 -r1.44 --- UnknownElement.java 1 Apr 2003 15:34:38 -0000 1.43 +++ UnknownElement.java 2 Apr 2003 11:43:41 -0000 1.44 @@ -144,8 +144,7 @@ // 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 @@ } child.handleChildren(realChild, childWrapper); - -// if (parent instanceof TaskContainer) { -// ((Task) realChild).maybeConfigure(); -// } } } 1.11 +0 -15 ant/src/main/org/apache/tools/ant/taskdefs/Sequential.java Index: Sequential.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Sequential.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -u -r1.10 -r1.11 --- Sequential.java 10 Feb 2003 14:13:36 -0000 1.10 +++ Sequential.java 2 Apr 2003 11:43:41 -0000 1.11 @@ -83,21 +83,6 @@ 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. *

* @param nestedTask Nested task to execute Sequential