ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Ferdig <>
Subject RE: criticism: property handling (here: no overwrite)
Date Mon, 16 Jul 2001 11:08:17 GMT
has there been any progress on this issue?  I've just run into it, and am
trying to resolve it.

the problem is that I have a directory specified in my global classpath that
doesn't always exist.  in fact, I can't even run the task that creates the
directory because I can't get past the initial parsing of the build.xml

short term solution: I'm looking into appending the specific directory to
the classpath in the targets that utilize it and removing it from the global
classpath, but that's a bit contrary to using a global path in the first



-----Original Message-----
From: Mark Hewitt
To: ''
Sent: 7/10/2001 6:41 AM
Subject: RE: criticism: property handling (here: no overwrite)

[sorry to be late reading this]

But this solution does not work if (as in my case) ${lib.dir} is
created by another target.

Any suggestions for this case?


-----Original Message-----
From: Stefano Mancarella []
Sent: 13 June 2001 15:06
Subject: Re: criticism: property handling (here: no overwrite)

From: "Christopher Berry" <>
> Conor hit the nail on the head. There are times when the path needs to
> contain items which do not yet exist. In my case, this is actually
> dependent on a Task firing -- I unpack different "distributions" which
> initially as TAR.GZ files.
> Ideally I want a single <path> defined (my Classpath) -- at the top of
> file -- which is used by reference in several Tasks. (The ol' Don't
> Yourself rule again ;-). But that isn't possible right now because the
> <path> element is evaluated up-front (and croaks). A lazy evaluation
> fix my situation.

I had exactly the same problem.
I've solved it using a nested <fileset> in my path definition which
all jars in a directory. It works perfectly: my classpath contains also
added to that directory after the path definition.
Here's an example:

 <path id="cpath">
  <fileset dir="${lib.dir}" includes="*.jar" />

 <target name="init">
  <copy file="${some.dir}/library1.jar" todir="${lib.dir}" />
  <get src=""

 <target name="build" depends="init">
  <javac classpathref="cpath" srcdir="${src.dir}" destdir="${build.dir}"

View raw message