ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Task.java
Date Mon, 08 Jan 2001 16:51:35 GMT
bodewig     01/01/08 08:51:35

  Modified:    docs     index.html
               src/main/org/apache/tools/ant Task.java
  Log:
  Document that Task.execute() can be invoked more than once.
  
  Submitted by:	Rosen, Alex <arosen@silverstream.com>
  
  Revision  Changes    Path
  1.181     +6 -2      jakarta-ant/docs/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/index.html,v
  retrieving revision 1.180
  retrieving revision 1.181
  diff -u -r1.180 -r1.181
  --- index.html	2001/01/08 12:42:46	1.180
  +++ index.html	2001/01/08 16:51:29	1.181
  @@ -29,7 +29,7 @@
   </ul>
   
   <p>Version: @VERSION@</p>
  -<p>$Id: index.html,v 1.180 2001/01/08 12:42:46 bodewig Exp $</p>
  +<p>$Id: index.html,v 1.181 2001/01/08 16:51:29 bodewig Exp $</p>
   
   <hr>
   <h2>Table of Contents</h2>
  @@ -6205,7 +6205,11 @@
     <li>All attributes of all child elements get set via their corresponding
       <code>setXXX</code> methods - at runtime.</li>
   
  -  <li><code>execute()</code> is called at runtime.</li>
  +  <li><code>execute()</code> 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 on target3, then running 
  +    "ant target1 target2" will run all tasks in target3 twice.</li>
   
   </ol>
   <h3>Example</h3>
  
  
  
  1.17      +6 -3      jakarta-ant/src/main/org/apache/tools/ant/Task.java
  
  Index: Task.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Task.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Task.java	2001/01/03 14:18:27	1.16
  +++ Task.java	2001/01/08 16:51:34	1.17
  @@ -168,18 +168,21 @@
       }
   
       /**
  -     * Called by the project to let the task initialize properly. Normally it does nothing.
  +     * Called by the project to let the task initialize properly. 
        *
        * @throws BuildException if someting goes wrong with the build
        */
       public void init() throws BuildException {}
   
       /**
  -     * Called by the project to let the task do it's work. Normally it does nothing.
  +     * Called by the project to let the task do it's work. This method may be 
  +     * called more than once, if the task is invoked more than once. For example, 
  +     * if target1 and target2 both depend on target3, then running 
  +     * "ant target1 target2" will run all tasks in target3 twice.
        *
        * @throws BuildException if someting goes wrong with the build
        */
  -    public void execute() throws BuildException {};
  +    public void execute() throws BuildException {}
   
       /**
        * Returns the file location where this task was defined.
  
  
  

Mime
View raw message