[EMAIL PROTECTED] writes:
>
>
> Andrew Sudell wrote:
> >
> > Since build.bat saves the old ANT_HOME, and build.sh can't
> > bother it's parent environment, and the ant you just
> > bootstraped may well be incompatible with the one in
> > ANT_HOME, it's probably a good idea to always set ANT_HOME
> > to the directory being build.
>
> I often use Ant to build projects other than Ant itself...
>
Of course, that's the point.
But generally I build other projects using ANT_HOME/bin/ant
(in the case of local development) or the build script in
the project (when supplied as in the case of the jakarta projects).
Honestly, it had not occurred to me that anyone would use the build
scripts in jakarta-ant to build other things.
I'd prefer that build.[sh|bat] add the local ant.jar to the classpath,
but for my purposes, I can unset ANT_HOME before building ant.
(The paranoid part of me should have thought of that anyway!)
As I've had an opportunity to build on other machines though,
I've hit a related issue. The other change was to explicitly
invoke java with "-classpath $LOCALCLASSPATH". On JDK 1.1.x,
unfortunately there is a difference between
CLASSPATH=foo:bar
export CLASSPATH
java blah
and
java -classpath foo:bar blah
Since the java script alters CLASSPATH before loading the VM. Using
"-classpath" ends up omitting classes.zip from the classpath, and
results in the error
Unable to initialize threads: cannot find class java/lang/Thread
Can I suggest adding something like
if test -f $JAVA_HOME/lib/classes.zip ; then
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
fi
to build.sh to get around that difference? The alternative
might be to set and reset classpath in the environment and
avoid the -classpath flag.
Drew
--
Drew Sudell [EMAIL PROTECTED] http://www.op.net/~asudell