Dmitry
Dmitry

Reputation: 3038

Ant Code Review

folks!

I have two questions (may be stupid).

Say, there are three code excerpts:

(1) <target name="test1" depends="INIT">
(2) <target name="test2" depends="INIT">
(3) <target name="TEST3" depends="INIT, test1, test2">

and the TEST3 is a default target of a project.

How many times does INIT executes?

Is it a good idea to extract, for example, macrodefs in a separate file and then include it into the main file (some kind of modules)

Upvotes: 1

Views: 191

Answers (1)

Arpit
Arpit

Reputation: 6260

Only once. When test2/TEST3 will execute, it will know that INIT has already been executed.

Also, the target depends on INIT, i.e., for the execution of that target, INIT must have been executed already, if not... then only execution will go to INIT.

Upvotes: 2

Related Questions