ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "O'Hara, Patrick" <>
Subject RE: depends vs. antcall
Date Thu, 28 Jun 2001 14:41:50 GMT
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 -->

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 name="some common functionality">
 <!-- Do Some common processing -->
<target name="simple2" depends="simple1, some common functionality">
 <!-- Do Some more processing -->

The result leaves me wondering what the purpose of antcall is?

Patrick O'Hara

-----Original Message-----
From: Kyle Adams []
Sent: Thursday, June 28, 2001 8:39 AM
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 name="all">
  <antcall target="init" />
  <antcall target="build" />
  <antcall target="deploy" />
  <antcall target="clean" />

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?


View raw message