ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Fennell" <>
Subject RE: Using old ant.jar in build.bat?
Date Sun, 09 Jul 2000 21:42:46 GMT
Maybe I didn't explain myself well enough. The issue I had was in building
the latest version of ant from CVS using the approach of bootstrap.bat then
build.bat.  *Not* using ant to build one of my projects. The problem was
that bootstrapping produces the new ant.jar file using shell commands
(javac, copy etc.) so that no version incompatibility issues are
encountered, but then build.bat which does the final build and install using
ant itself does not use the jarfile created by the bootstrapper.

So the problem only occurs in two cases:
1) Try to build ant for the first time, in which case build.bat will not
find any ant.jar and the invocation of ant will fail.
2) Try to build ant with a version installed that is more than marginally
out of date. Then build.bat does find an ant.jar, but it's the old one and
if ant's personal build.xml uses new tasks, or more likely, new syntax that
isn't supported by the previously installed version and the build fails.

Does this make more sense? Then it's pretty reasonable to expect the ant.jar
to be in .\lib because the bootstrapper just put it there! Also, if it's
your first time building you've probably pushed your xml parser into your
classpath to make ant work, although I take your point that if you are
rebuilding it is possible that you've stored your parser's jar file in the
%ANT_HOME%\lib directory and modified ant.bat to push it into the classpath.
But if that is the case then a) you probably know to add the parser jar(s)
to the classpath when the ant build blows up, or the newly bootstrapped
ant.jar should be the topmost thing in the classpath, and still add
everything in %ANT_HOME%\lib...


-----Original Message-----
From: []
Sent: Sunday, July 09, 2000 13:20
Subject: Re: Using old ant.jar in build.bat?

Tim Fennell wrote:
> I was just building the latest version of the source code and ran
> into a problem with the ant build.xml file using a task with
> semantics that were different from my current install.
> So, I played around a little, and fixed up the build.bat file. What
> I'm wondering is, after bootstrapping ant why does the build.bat
> file have this line:
>    for %%i in ($ANT_HOME%\lib\*.jar) do call lcp.bat %%i
> which puts the *old* jar(s) into the classpath.

This places *all* the jars in the %ANT_HOME%\lib directory into the
classpath.  This would include, for example, the JAXP or Xerces jar files.

I'm not sure why you assume that these jars are old.  If you want to update
the ant jar in this directory, simply build ant and specify the "install"

> Works much better for me when I replace that with:
>    if exist .\lib\ant.jar call lcp.bat .\lib\ant.jar

This assumes that the only jar that you want is ant, and that the version
you want can be found relative to the current working directory.  In many
cases, I'm using this batch file/shell script from another directory; and
in the case of ant, typical usage would get you the exact same jar file
that you previous referred to as *old*.

Am I missing something?

- Sam Ruby

View raw message