From 96a7c2dc0848c6fc613a57634d632d265aadb959 Mon Sep 17 00:00:00 2001
From: Jan Materne
Call-Graph: A --> B --> C --> D
In a chain of dependencies stretching back from a given target such as D above, each target gets executed only once, even when @@ -109,6 +111,8 @@ </target> +
+Call-Graph: myTarget.check --> maybe(myTarget)
If no if
and no unless
attribute is
present, the target will always be executed.
"init"
.
+ initialization targets have the name "init"
.
+ + ++ <project> + <target name="init"> + <tstamp/> + </target> + <target name="otherTarget" depends="init"> + ... + </target> + </project> +
Especially if you only have a few tasks you also could place these + tasks direclty under the project tag (since Ant 1.6.0):
++ <project> + <tstamp/> + </project> +
If the depends attribute and the if/unless attribute are set, the depends attribute is executed first.
@@ -242,6 +263,9 @@ </target> ++ +Call-Graph: create-directory-layout --> 'empty slot' --> compile
And you need to generate some source before compilation, then in your main build file you may use something like
+@@ -251,6 +275,9 @@ </target>
+ +Call-Graph: create-directory-layout --> generate-sources --> compile
This will ensure that the generate-sources target is executed before the compile target.