Question about the task life cycle (one shot or not)

Al Le <[email protected]>
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <[email protected]>
Hello,

I have a question about how many times a task is instantiated during a 
build. I've read the description at 
https://ant.apache.org/manual/develop.html but still a question remains.

[BTW, there is a typo on that page: "addCondifgired"]

The mentioned page describes very well how a task is instantiated and 
populated. But in the end it states:

     If target1 and target2 both depend on target3, then running 'ant
     target1 target2' will run all tasks in target3 twice.


Does this mean that the same instance of the task object is used twice? 
Or will *two* instances of the task be created?

In other words: Can it happen that the "execute" method of a task 
instance is executed more than once?


In the former case, what is a good place to reset all the data in the 
task? init()?

In the latter case, there would be no need to worry about it because 
each task instance is used exactly once.

Thanks!
AL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.