Many people have said that depends is better. In general I agree, but there is one case where you might think you need antcall, that I would like to address. If you have a target such as:
<target name="complex">
<!-- Do Some processing -->
<antcall target="some common functionality"/>
<!-- Do Some more processing -->
</target>
You might think you need antcall for this. It would be easy to break this into three dependent targets, like:
<target name="simple1">
<!-- Do Some processing -->
</target>
<target name="some common functionality">
<!-- Do Some common processing -->
</target>
<target name="simple2" depends="simple1, some common functionality">
<!-- Do Some more processing -->
</target>
The result leaves me wondering what the purpose of antcall is?
Patrick O'Hara
262-408-3849
[EMAIL PROTECTED]
-----Original Message-----
From: Kyle Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 8:39 AM
To: [EMAIL PROTECTED]
Subject: depends vs. antcall
I've seen both the depends attribute of the target tag, and the antcall task used in very similar methods - to call internal targets the comprise an external target. For example:
<target name="all" depends="init, build, deploy, clean">
</target>
vs.
<target name="all">
<antcall target="init" />
<antcall target="build" />
<antcall target="deploy" />
<antcall target="clean" />
</target>
I've also seen this for the deploy target (to make jar, war, and ear files), for the build target (to make directories, compile). My question - which is the better way of doing this?
Kyle