First point I'd make is that it is easier (and better?)
to define the classpath for ANT (ant only) in the batch file
(like the ant.bat, it handles it's own jars nicely)
and set up a fileset for your classpath inside the build
script. This means you can have incompatibilities between
these (like different XML parser as I have) and it will work
OK. You are passing in CATALINE_HOME, so you can get it all from here...

I know this does not solve your problem...
Maybe it would be easier if you mentioned some specific 'cannot resolve
symbol's?

Alan.


-----Original Message-----
From: Peter Georgiou [mailto:[EMAIL PROTECTED]]
Sent: 13 November 2001 11:12
To: [EMAIL PROTECTED]
Subject: build.bat problem


hi

I was recently using ant within tomcat3.2 to build my struts
applications.  Now I've changed to Tomcat4, my build is having trouble
recognising java classes within my web app, which I presume is a
classpath problem.  When I build I get lots of 'cannot resoolve symbol'
errors.  Can someone tell me if the following build.bat file is correct?
Or/and someone mail me an example of a build.bat file for building a
struts app in tomcat4. 

Thanks

Peter


@echo off
rem build.bat -- Build Script for the "Fooddoof" Web Application
rem $Id: source.html,v 1.2.4.3 2001/03/08 00:56:41 marcsaeg Exp $

set _CP=%CP%

rem Identify the custom class path components we need
set CP=%ANT_HOME%\lib\ant.jar;%CATALINA_HOME%\common\lib\servlet.jar
set CP=%CP%;%CATALINA_HOME%\common\lib\xerces.jar;
set CP=%CP%;%JAVA_HOME%\lib\tools.jar

set
CP=%CP%;%CATALINA_HOME%\webapps\fooddoof\web-inf\lib\jdbc2_0-stdext.jar
set CP=%CP%;%CATALINA_HOME%\webapps\fooddoof\web-inf\lib\jta.jar
set CP=%CP%;%CATALINA_HOME%\webapps\fooddoof\web-inf\lib\struts.jar
set CP=%CP%;%CATALINA_HOME%\webapps\fooddoof\web-inf\lib\tiles.jar
set
CP=%CP%;%CATALINA_HOME%\webapps\fooddoof\web-inf\lib\commons-beanutils.j
ar
set
CP=%CP%;%CATALINA_HOME%\webapps\fooddoof\web-inf\lib\commons-digester.ja
r
set
CP=%CP%;%CATALINA_HOME%\webapps\fooddoof\web-inf\lib\commons-collections
.jar


rem Execute ANT to perform the requird build target
java -classpath %CP%;%CLASSPATH% org.apache.tools.ant.Main
-Dcatalina.home=%CATALINA_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9

set CP=%_CP%
set _CP= 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to