Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 55735 invoked from network); 23 Aug 2007 08:23:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Aug 2007 08:23:28 -0000 Received: (qmail 5599 invoked by uid 500); 23 Aug 2007 08:23:24 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 5289 invoked by uid 500); 23 Aug 2007 08:23:24 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 5278 invoked by uid 500); 23 Aug 2007 08:23:24 -0000 Received: (qmail 5275 invoked by uid 99); 23 Aug 2007 08:23:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2007 01:23:24 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2007 08:23:26 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 778461A981A; Thu, 23 Aug 2007 01:23:06 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r568882 - /ant/core/trunk/docs/manual/develop.html Date: Thu, 23 Aug 2007 08:23:06 -0000 To: ant-cvs@apache.org From: peterreilly@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070823082306.778461A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: peterreilly Date: Thu Aug 23 01:23:05 2007 New Revision: 568882 URL: http://svn.apache.org/viewvc?rev=568882&view=rev Log: bugzilla 43040: incorrect information on when tasks get created Modified: ant/core/trunk/docs/manual/develop.html Modified: ant/core/trunk/docs/manual/develop.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/develop.html?rev=568882&r1=568881&r2=568882&view=diff ============================================================================== --- ant/core/trunk/docs/manual/develop.html (original) +++ ant/core/trunk/docs/manual/develop.html Thu Aug 23 01:23:05 2007 @@ -76,9 +76,18 @@

The Life-cycle of a Task

    -
  1. The task gets instantiated using a no-argument constructor, at parser - time. This means even tasks that are never executed get - instantiated.
  2. +
  3. + The xml element that contains the tag corresponding to the + task gets converted to an UnknownElement at parser time. + This UnknownElement gets placed in a list within a target + object, or recursivly within another UnknownElement. +
  4. +
  5. + When the target is executed, each UnknownElement is invoked + using an perform() method. This instantiates + the task. This means that tasks only gets + instantiated at run time. +
  6. The task gets references to its project and location inside the buildfile via its inherited project and @@ -86,18 +95,18 @@
  7. If the user specified an id attribute to this task, the project - registers a reference to this newly created task, at parser + registers a reference to this newly created task, at run time.
  8. The task gets a reference to the target it belongs to via its inherited target variable.
  9. -
  10. init() is called at parser time.
  11. +
  12. init() is called at run time.
  13. All child elements of the XML element corresponding to this task are created via this task's createXXX() methods or instantiated and added to this task via its addXXX() - methods, at parser time.
  14. + methods, at run time.
  15. All attributes of this task get set via their corresponding setXXX methods, at runtime.
  16. @@ -109,10 +118,8 @@
  17. All attributes of all child elements get set via their corresponding setXXX methods, at runtime.
  18. -
  19. execute() is called at runtime. While the above initialization - steps only occur once, the execute() method may be - called more than once, if the task is invoked more than once. For example, - if target1 and target2 both depend +
  20. execute() is called at runtime. + If target1 and target2 both depend on target3, then running 'ant target1 target2' will run all tasks in target3 twice.
  21. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org