ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "O'Hara, Patrick" <patrick.oh...@workscape.com>
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 -->
</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
patrick.ohara@workscape.com



-----Original Message-----
From: Kyle Adams [mailto:kadams@gfs.com]
Sent: Thursday, June 28, 2001 8:39 AM
To: ant-user@jakarta.apache.org
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

Mime
View raw message