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)
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
.
精彩评论