You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Frank W. Zammetti" <fz...@omnytex.com> on 2005/08/12 20:53:51 UTC

Ant dependencies task

Does anyone have any experience with this add-on?

http://www.httpunit.org/doc/dependencies.html

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.properties" />
     <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" />
    </dependencies>
</target>

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 have
also tried having all the antcalls EXCEPT the one to get_dependencies and
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 with
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
http://www.omnytex.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org