ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yangyuexiang <>
Subject build.xml problem need help
Date Wed, 06 Sep 2000 05:02:06 GMT

After I ran build, I found all directories were created under wepapps.
But I found the classes compiled did not be copied to the corresponding
directory. My source files are
organized into packages under src directory.

The build and     build.xml file were attached.

The following is the results displayed when  I run build script.

Thanks for you help!

$ su -c "build"
Buildfile: build.xml
Project base dir set to: /home/yuexiang/working/msproject
Executing Target: prepare
Created dir: /opt/tomcat/webapps/packing
Copying 54 files to /opt/tomcat/webapps/packing
Created dir: /opt/tomcat/webapps/packing/WEB-INF
Created dir: /opt/tomcat/webapps/packing/WEB-INF/classes
Created dir: /opt/tomcat/webapps/packing/WEB-INF/classes/packing
Created dir: /opt/tomcat/webapps/packing/WEB-INF/classes/packing/log
Created dir: /opt/tomcat/webapps/packing/WEB-INF/classes/packing/gui
Created dir: /opt/tomcat/webapps/packing/WEB-INF/lib
Copying 2 files to /opt/tomcat/webapps/packing/WEB-INF/lib
Created dir: /opt/tomcat/webapps/packing/javadoc
Executing Target: compile
Compiling 9 source files to /opt/tomcat/webapps/packing/WEB-INF/classes
Performing a Modern Compile
Copying 1 support files to /opt/tomcat/webapps/packing/WEB-INF/classes
Completed in 1 seconds


build script: --------------------------------

# build -- Build Script for "My Application"
# $Id: source.html,v 1.2 2000/03/28 00:44:11 craigmcc Exp $

# Identify the custom class path components we need


# Execute ANT to perform the requested build target
java -Dtomcat.home=$TOMCAT_HOME -classpath $CP:$CLASSPATH \ "$@"

build.xml ----------------------------------------------

<!-- A "project" describes a set of targets that may be requested
     when Ant is executed.  The "default" attribute defines the
     target which is executed if no specific target is requested,
     and the "basedir" attribute defines the current working directory
     from which Ant executes the requested task.  This is normally
     set to the current working directory.

<project name="packing" default="compile" basedir=".">

<!-- Property Definitions

     Each of the following properties are used by convention in this
     build file.  The values specified can be overridden at run time by
     adding a "-Dname=value" argument to the command line that invokes
     This technique is normally used to copy the values of the ANT_HOME
     and TOMCAT_HOME environment variables into the "ant.home" and
     "tomcat.home" properties, which are normally not defined
explicitly.          Base name of this application, used to
                       construct filenames and directories.

     deploy.home       The name of the directory into which the
                       deployment hierarchy will be created.
                       Normally, this will be the name of a
                       subdirectory under $TOMCAT_HOME/webapps.

     dist.home         The name of the base directory in which
                       distribution files are created.

     dist.src          The name of the distribution JAR file
                       containing the application source code,
                       to be stored in the "dist.home" directory.
                       This filename should end with ".jar".

     dist.war          The name of the Web ARchive (WAR) file
                       containing our deployable application.
                       This filename should end with ".war".

     javadoc.home      The name of the base directory in which
                       the JavaDoc documentation for this application
                       is generated.

     tomcat.home       The name of the base directory in which
                       Tomcat has been installed.  This value is
                       normally set automatically from the value
                       of the TOMCAT_HOME environment variable.

     In the example below, the application being developed will be
     to a subdirectory named "myapp", and will therefore be accessible


  <property name=""       value="packing"/>
  <property name="deploy.home"
  <property name="dist.home"      value="${deploy.home}"/>
  <property name="dist.src"       value="${}.jar"/>
  <property name="dist.war"       value="${}.war"/>
  <property name="javadoc.home"   value="${deploy.home}/javadoc"/>
  <property name="build.compiler" value="modern"/>

<!-- The "prepare" target is used to construct the deployment home
     directory structure (if necessary), and to copy in static files
     as required.  In the example below, Ant is instructed to create
     the deployment directory, copy the contents of the "web/" source
     hierarchy, and set up the WEB-INF subdirectory appropriately.

View raw message