ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burgess, Benjamin" <>
Subject RE: Ant dependencies task
Date Fri, 12 Aug 2005 19:12:16 GMT
A series of antcalls is not an alternative to using the depends
attribute.  These are 2 different things.  The depends attribute is used
to determine the order in which targets should run within a project.  An
antcall is used to create a new project that uses the same build file.
A new project object is setup in memory when using antcall.


-----Original Message-----
From: Frank W. Zammetti [] 
Sent: Friday, August 12, 2005 2:54 PM
Subject: Ant dependencies task

Does anyone have any experience with this add-on?

It works great for me, but one problem I have is that my build scripts
usually have a single "build" target with a bunch of antcalls to other
targets in it.  I have the following target which is executed first:

<target name="get_dependencies">
  <typedef classpath="${basedir}/ant-dependencies.jar"
   resource="" />
     <dependencies pathId="compiletime_classpath" verbose="true">
     <dependency group="servletapi" version="2.3" />
     <dependency group="checkstyle" version="3.4" />
     <dependency group="antlr" version="2.7.5" />
     <dependency group="regexp" version="1.3" />

However, the problem I'm encountering is that the compiletime_classpath
property is not available outside this target.  HOWEVER, if instead of a
series of antcalls I instead have my build target like so:

<target name="build"
depends="get_dependencies,compile,make_javadocs,checkstyle,cleanup" />

Then it works, the property is available to all the other targets.  I
also tried having all the antcalls EXCEPT the one to get_dependencies
instead made that a depends entry for the build target, but that didn't
work either.

Anyone have any ideas?  There is obviously some subtle thing going on
properties and scoping or some such, but I don't know what it is.  FYI,
the reason I'd prefer to do the antcalls is that I have like 15 targets
that get called, and having a big comma-sepated lists in the depends
attribute is kind of unwieldly.  Thanks!

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies

To unsubscribe, e-mail:
For additional commands, e-mail:

This message, including any attachments, contains confidential information intended for a
specific individual and purpose, and is protected by law.  If you are not the intended recipient,
please contact sender immediately by reply e-mail and destroy all copies.  You are hereby
notified that any disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message