File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Ant build in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Ant build in Tomcat" Watch "Ant build in Tomcat" New topic
Author

Ant build in Tomcat

Roopa Bagur
Ranch Hand

Joined: Nov 03, 2000
Posts: 267
HiAll,
I installed tomcat 3.2.1 & now I am trying to configure how to build my source using ANT.. I followed the instructions in tomcats source organization doc. Accordingly I have a build.bat in my source root directory but when I run that I get an error..The build.bat file has the following in it:
@echo on
rem build.bat -- Build Script for the "Hello, World" Application
rem $Id: source.html,v 1.2.4.2 2000/11/27 22:45:49 craigmcc Exp $
set _CP=%CP%
rem Identify the custom class path components we need
set CP=%TOMCAT_HOME%\lib\ant.jar;%TOMCAT_HOME%\lib\servlet.jar
set CP=%TOMCAT_HOME%\lib\jaxp.jar;%TOMCAT_HOME%\lib\parser.jar
set CP=%CP%;%JAVA_HOME%\lib\tools.jar
rem Execute ANT to perform the requird build target
java -classpath %CP%;%CLASSPATH% org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
set CP=%_CP%
set _CP=
//end of file
[Note: My TOMCAT_HOME & JAVA_HOME variables are set]
The error I am getting is as follows:

c:\jakarta-tomcat-3.2.1\MyProject>java -classpath \lib\jaxp.jar;\lib\parser.jar;C:\Java\jdk1.3\lib\tools.jar;c:\j2sdkee
1.2.1\lib\j2ee.jar;c:\multipart\lib\cos.jar org.apache.tools.ant.Main -Dtomcat.home=
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
I would appreciate any help in this matter.
Thanks,
Roopa
Roopa Bagur
Ranch Hand

Joined: Nov 03, 2000
Posts: 267
Ok guys I finally fixed it.
Originally posted by Roopa Bagur:
HiAll,
I installed tomcat 3.2.1 & now I am trying to configure how to build my source using ANT.. I followed the instructions in tomcats source organization doc. Accordingly I have a build.bat in my source root directory but when I run that I get an error..The build.bat file has the following in it:
@echo on
rem build.bat -- Build Script for the "Hello, World" Application
rem $Id: source.html,v 1.2.4.2 2000/11/27 22:45:49 craigmcc Exp $
set _CP=%CP%
rem Identify the custom class path components we need
set CP=%TOMCAT_HOME%\lib\ant.jar;%TOMCAT_HOME%\lib\servlet.jar
set CP=%TOMCAT_HOME%\lib\jaxp.jar;%TOMCAT_HOME%\lib\parser.jar
set CP=%CP%;%JAVA_HOME%\lib\tools.jar
rem Execute ANT to perform the requird build target
java -classpath %CP%;%CLASSPATH% org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
set CP=%_CP%
set _CP=
//end of file
[Note: My TOMCAT_HOME & JAVA_HOME variables are set]
The error I am getting is as follows:

c:\jakarta-tomcat-3.2.1\MyProject>java -classpath \lib\jaxp.jar;\lib\parser.jar;C:\Java\jdk1.3\lib\tools.jar;c:\j2sdkee
1.2.1\lib\j2ee.jar;c:\multipart\lib\cos.jar org.apache.tools.ant.Main -Dtomcat.home=
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
I would appreciate any help in this matter.
Thanks,
Roopa

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant build in Tomcat