ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick, Brian E." <>
Subject RE: Ant dependencies task
Date Fri, 12 Aug 2005 19:18:52 GMT
You can recode

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


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

-----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:

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

View raw message