Hi David, On Tue, May 07, 2002 at 11:56:57AM +1000, [EMAIL PROTECTED] wrote: > > > I tried for the first time to build the logkit, avalon, and excalibur > projects last night and struck 2 problems. Now it might be that my machine > is set up incorrectly but here goes. > > The first was in Build.bat and the problem centred around the code: > > if exist "%BASE%\tools\bin\ant.bat" set LOCAL_AVALON_TOOLS=tools > if exist "%BASE%\..\jakarta-avalon\tools\bin\ant.bat" set > LOCAL_AVALON_TOOLS=%BASE%\..\jakarta-avalon\tools > if exist "%BASE%\..\..\jakarta-avalon\tools\bin\ant.bat" set > LOCAL_AVALON_TOOLS=%BASE%\..\..\jakarta-avalon\tools > > The problem I encountered was that the ..\..\ when executed from 1 > directory down on a drive still works. My jakarta-avalon directory was a > folder directly under the drive. So from \avalon-logkit\ (?) it could find > \..\jakarta-avalon and \..\..\jakarta-avalon. But it set the relative path > on the directory to an invalid directory which throws a problem in the > actual ant.bat / ant task.
My brain isn't working.. I didn't follow that. I gather you have: c:\jakarta-avalon c:\jakarta-avalon-logkit Then if you run build.bat in jakarta-avalon-logkit, BASE will be set to '.', and the three tests will be: .\..\..\jakarta-avalon\tools\bin\ant.bat .\..\jakarta-avalon\tools\bin\ant.bat .\tools\bin\ant.bat Why would it be "\..\jakarta-avalon" as your mail says? > My fix was to set the AVALON_TOOLS CMD variable > but you could reverse the order ot the 3 "if exist" clauses thus (which > should work): > > if exist "%BASE%\..\..\jakarta-avalon\tools\bin\ant.bat" set > LOCAL_AVALON_TOOLS=%BASE%\..\..\jakarta-avalon\tools > if exist "%BASE%\..\jakarta-avalon\tools\bin\ant.bat" set > LOCAL_AVALON_TOOLS=%BASE%\..\jakarta-avalon\tools > if exist "%BASE%\tools\bin\ant.bat" set LOCAL_AVALON_TOOLS=tools If that fixes the problem I'm happy to do it. > The second problem was in ant.bat. My JDK is under "program files" (note > the space). But when it executes the following code: > > :runAnt > %_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS% > org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS% > goto end > > :runAntWithJikes > %_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" > -Djikes.class.path=%JIKESPATH% %ANT_OPTS% org.apache.tools.ant.Main > %ANT_CMD_LINE_ARGS% > > It cannot parse the java command pat. I fixed this by placing quotes around > it like this "%_JAVACMD%" Okay, I'll fix this in CVS. I see the Ant's CVS head has already fixed the problem. > Not sure how these changes will stand up on anyAny comments on my patches? > > Apart from this, the compiles went smoothly. Never having seen or used ant, > I am impressed with the scripts and how well it really went. wohoo :) Thanks for the constructive feedback! --Jeff > Thanks to all concerned! > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>