tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Horowitz <>
Subject Can't build tomcat3.1 sample with ANT
Date Mon, 22 May 2000 01:06:40 GMT
I'm trying to build the sample in Tomcat 3.1 (in
%TOMCAT_HOME%\doc\appdev\sample) using ANT and cannot seem to get it
working.  I'm on NT 4.0 and have installed JDK 1.3.  Tomcat is installed
in d:\jakarta-tomcat.  I made some small changes to build.bat and
build.xml to work around other problems that I've experienced. I'm able
to run:

> build prepare

correctly, and I'm trying to run:

> build compile

As you can see from the output below, no error messages are displayed
from ANT or javac, but the Hello.class file is not created. 

Below is pasted my build.bat file, my build.xml file, and the output
from ANT running in verbose mode.  I'd really appreciate some help. 
I've read all the doc and can't figure this out. 

Thanks so much for your assistance

Rick Horowitz


@echo off
rem build.bat -- Build Script for the "Hello, World" Application
rem $Id: build.bat,v 1.1 2000/04/04 22:01:13 craigmcc Exp $

echo ready to execute ant 1

goto noclasspath

echo ready to execute ant 2
goto restofclasspath

echo ready to execute ant 3
echo ready to execute ant 3b

echo ready to execute ant 4
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar

echo ant classpath = %classpath%

rem Execute ANT to perform the requested build target
java -verbose -Dtomcat.home=%TOMCAT_HOME% %1
%2 %3 %4 %5 %6 %7 %8 



<project name="Hello, World" default="compile" basedir=".">

<!-- Simple "Hello, World" project to provide a concrete example of
     the recommendations in the Application Developer's Guide.

     NOTE:  Before using this file as is, you should review the
     values for the properties that are defined below.
     In particular, it is assumed that you wish to install this
     application under context path "/myapp" in the Tomcat installation
     defined by your TOMCAT_HOME environment variable.

  <property name=""       value="myapp"/>
  <property name="deploy.home"   
  <property name="dist.home"      value="${deploy.home}"/>
  <property name="dist.src"       value="${}/src"/>
  <property name="dist.war"       value="${}.war"/>
  <property name="javadoc.home"   value="${deploy.home}/javadoc"/>

  <target name="prepare" init="init">
    <mkdir dir="${deploy.home}"/>
    <copydir src="web" dest="${deploy.home}"/>
    <mkdir dir="${deploy.home}/WEB-INF"/>
    <copyfile src="etc/web.xml" dest="${deploy.home}/WEB-INF/web.xml"/>
    <mkdir dir="${deploy.home}/WEB-INF/classes"/>
    <mkdir dir="${deploy.home}/WEB-INF/lib"/>
    <copydir src="lib" dest="${deploy.home}/lib"/>
    <mkdir dir="${javadoc.home}"/>

  <target name="clean" init="init">
    <deltree dir="${deploy.home}"/>

  <target name="compile" depends="prepare" init="init">
    <javac srcdir="src" destdir="${deploy.home}/WEB-INF/classes"
           debug="on" optimize="off" deprecation="off"/>

  <target name="compilenew" depends="prepare" init="init">
    <javac srcdir="src" destdir="src"
           debug="on" optimize="off" deprecation="off"/>

  <target name="javadoc" depends="prepare" init="init">
    <!-- TODO -->

  <target name="all" depends="clean,prepare,compile,javadoc"

  <target name="dist" depends="prepare,compile" init="init">
    <jar jarfile="${dist.home}/${dist.src}"
         basedir="." items="*"/>
    <jar jarfile="${dist.home}/${dist.war}"
         basedir="${deploy.home}" items="*"/>


Output from running:

build compile

D:\jakarta-tomcat\doc\appdev\sample>build compile
ant classpath =
Buildfile: build.xml
Setting project property: -> 1.3
Detected Java Version: 1.3
Detected OS: Windows NT
 +User task: expand
 +User task: javac
 +User task: keysubst
 +User task: copyfile
 +User task: gzip
 +User task: javadoc
 +User task: jar
 +User task: property
 +User task: rename
 +User task: filter
 +User task: copydir
 +User task: cvs
 +User task: chmod
 +User task: java
 +User task: renameext
 +User task: available
 +User task: deltree
 +User task: ant
 +User task: netrexxc
 +User task: exec
 +User task: fixcrlf
 +User task: taskdef
 +User task: tar
 +User task: mkdir
 +User task: delete
 +User task: zip
 +User task: echo
 +User task: tstamp
 +User task: replace
 +User task: get
 +User task: rmic
 +User task: javadoc2
Setting project property: -> Java(TM) 2 Runtime
Environment, Standard Edition
Setting project property: sun.boot.library.path -> d:\jdk1.3\jre\bin
Setting project property: java.vm.version -> 1.3.0-C
Setting project property: java.vm.vendor -> Sun Microsystems Inc.
Setting project property: java.vendor.url ->
Setting project property: path.separator -> ;
Setting project property: -> Java HotSpot(TM) Client VM
Setting project property: file.encoding.pkg ->
Setting project property: -> Java Virtual
Machine Specification
Setting project property: user.dir ->
Setting project property: java.runtime.version -> 1.3.0-C
Setting project property: java.awt.graphicsenv ->
Setting project property: os.arch -> x86
Setting project property: -> C:\TEMP\
Setting project property: line.separator ->

Setting project property: java.vm.specification.vendor -> Sun
Microsystems Inc.
Setting project property: java.awt.fonts ->
Setting project property: -> Windows NT
Setting project property: java.library.path ->
in;d:\Program Files\IBM\GSK\lib;C:\WINNT\system32;C:\WINNT;
Setting project property: -> Java Platform API
Setting project property: java.class.version -> 47.0
Setting project property: os.version -> 4.0
Setting project property: user.home -> C:\WINNT\Profiles\rick
Setting project property: user.timezone ->
Setting project property: java.awt.printerjob ->
Setting project property: file.encoding -> Cp1252
Setting project property: java.specification.version -> 1.3
Setting project property: java.class.path ->
Setting project property: -> rick
Setting project property: java.vm.specification.version -> 1.0
Setting project property: java.home -> d:\jdk1.3\jre
Setting project property: user.language -> en
Setting project property: java.specification.vendor -> Sun Microsystems
Setting project property: awt.toolkit ->
Setting project property: -> mixed mode
Setting project property: java.version -> 1.3.0
Setting project property: java.ext.dirs -> d:\jdk1.3\jre\lib\ext
Setting project property: sun.boot.class.path ->
Setting project property: java.vendor -> Sun Microsystems Inc.
Setting project property: file.separator -> \
Setting project property: java.vendor.url.bug ->
Setting project property: -> UnicodeLittle
Setting project property: sun.cpu.endian -> little
Setting project property: user.region -> US
Setting project property: sun.cpu.isalist -> pentium_pro+mmx pentium_pro
pentium+mmx pentium i486 i3
Setting ro project property: tomcat.home -> d:\jakarta-tomcat
Setting ro project property: ant.file ->
Setting project property: basedir -> D:\jakarta-tomcat\doc\appdev\sample
Project base dir set to: D:\jakarta-tomcat\doc\appdev\sample
Setting project property: -> myapp
Setting project property: deploy.home -> d:\jakarta-tomcat/webapps/myapp
Setting project property: dist.home -> d:\jakarta-tomcat/webapps/myapp
Setting project property: dist.src -> myapp/src
Setting project property: dist.war -> myapp.war
Setting project property: javadoc.home ->
 +Target: prepare
   +Task: mkdir
   +Task: copydir
   +Task: mkdir
   +Task: copyfile
   +Task: mkdir
   +Task: mkdir
   +Task: copydir
   +Task: mkdir
 +Target: clean
   +Task: deltree
 +Target: compile
   +Task: javac
 +Target: compilenew
   +Task: javac
 +Target: javadoc
 +Target: all
 +Target: dist
   +Task: jar
The items attribute is deprecated. Please use the includes attribute.
   +Task: jar
The items attribute is deprecated. Please use the includes attribute.
Build sequence for target `compile' is [prepare, compile]
Complete build sequence is [prepare, compile, javadoc, clean, all, dist,
Executing Target: prepare
Executing Target: compile
Compiling 1 source files to
Performing a Modern Compile
Completed in 0 seconds

View raw message