ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Sudell <asud...@Op.Net>
Subject Setting ANT_HOME in build.sh/build.bat
Date Sat, 01 Jul 2000 02:36:28 GMT

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.

For example building aginst the current source (but with ANT_HOME
pointing to something a week or so out), I blow out in build with

BUILD CONFIG ERROR

Class class org.apache.tools.ant.taskdefs.Copydir doesn't support the "forceover
write" property

...

But work fine with the patch below.  

Index: build.bat
===================================================================
RCS file: /home/cvspublic/jakarta-ant/build.bat,v
retrieving revision 1.7
diff -u -r1.7 build.bat
--- build.bat   2000/06/30 22:39:45     1.7
+++ build.bat   2000/07/01 02:35:00
@@ -1,7 +1,7 @@
 @echo off

 set _ANTHOME=%ANT_HOME%
-if "%ANT_HOME%" == "" set ANT_HOME=.
+set ANT_HOME=.

 set LOCALCLASSPATH=%CLASSPATH%
 for %%i in (%ANT_HOME%\lib\*.jar) do call lcp.bat %%i
Index: build.sh
===================================================================
RCS file: /home/cvspublic/jakarta-ant/build.sh,v
retrieving revision 1.8
diff -u -r1.8 build.sh
--- build.sh    2000/06/30 22:39:45     1.8
+++ build.sh    2000/07/01 02:35:00
@@ -1,8 +1,6 @@
 #!/bin/sh

-if [ "$ANT_HOME" = "" ] ; then
-  ANT_HOME=`pwd`
-fi
+ANT_HOME=`pwd`
 export ANT_HOME

 LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ':'`

-- 
    Drew Sudell        asudell@acm.org         http://www.op.net/~asudell


Mime
View raw message