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.


To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to