I upgraded to Tomcat 3.2.1 and now when I try to run build.bat script I get
the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/tools/ant/
Main
When I try to run ant from the command prompt I get this error:
Buildfile: build.xml
Project base dir set to: C:\dev\partScavenger
BUILD CONFIG ERROR: Could not create task of type: copy because I can't find
it
in the list of task class definitions
org.apache.tools.ant.BuildException: Could not create task of type: copy
because
I can't find it in the list of task class definitions
at org.apache.tools.ant.Project.createTask(Project.java:374)
at
org.apache.tools.ant.ProjectHelper.configureTasks(ProjectHelper.java:
216)
at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:193)
at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:134)
at org.apache.tools.ant.Main.runBuild(Main.java:223)
at org.apache.tools.ant.Main.main(Main.java:191)
I am using the sample build.bat file and the sample build.xml file that came
with Tomcat 3.2.1
I am not quite sure what the problem is because the build.bat file
initializes the classpath to the ant.jar file that comes with Tomcat.
Shouldn't ant find everything it needs in the jar file?
I've set up TOMCAT_HOME to point to the installation path of Tomcat-3.2.1
Thanks in advace for any help
Max
-----Ursprungliche Nachricht-----
Von: Stefan Bodewig [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 29. Januar 2001 09:18
An: [EMAIL PROTECTED]
Betreff: Re: Problem Compiling Servlets with build file
Maximilian Rehm <[EMAIL PROTECTED]> wrote:
> When trying to build my project with ant my servlets are not
> compiled and are not copied to WEB-INF/classes in my project
> directory. All other files (eg support files) in my src directory
> are being copied no problem.
The build file you are using has been designed for a version of Ant
that was current in April 2000 (when Tomcat 3.1 has been released). I
have not tried to find all problems, but it obviously depends on an
old feature where a target named init would be treated
differently. This won't work with Ant 1.2.
> I've installed jdk1.3, tomcat 3.1 and ant 1.2 on Win2K Prof
As you are not getting any error messages I doubt you are really using
Ant 1.2, most probably you pick up an older version of it from your
CLASSPATH (i.e. remove the ant.jar that shipped with Tomcat
3.1). After that you'll have to modify the sample build file to
actually work with Ant 1.2.
The best option might be to upgrade to Tomcat 3.2.1 anyway. I *hope*
the sample build files have been adapted to Ant 1.2 there.
Stefan