tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arturo Vazquez <>
Subject Re: Doc on ant deploy
Date Tue, 29 Apr 2003 17:14:16 GMT
On Tue, 2003-04-29 at 07:43, Jeffrey Cummings wrote:
> Where can I find complete documentation on ant “deploy” task?
I can't find a deploy task in the estandar/with optional tasks
distribution of ant so my guess is you are trying to deploy  webapp
using ant but don't know how...
am I right???
well in that case maybe this piece of my build.xml can help you
 <!-- ==================== Deploy Target
=================================== -->
    The "deploy" target copies the contents of the build directory into
    location required by our servlet container, and picks up any
    dependencies along the way.  AFter restarting the servlet container,
    can now test your web application.
    <target name="deploy" depends="package"
     description="Deploy application to servlet container">

      <!-- create the webapp image in the build directory -->
      <mkdir dir="${prepare.home}"/>

      <!-- Copy the contents of the build directory -->

      <mkdir dir="${prepare.home}"/>
      <mkdir dir="${prepare.conf}"/>
      <copy todir="${prepare.conf}">
         <fileset dir="${webapp.conf}"/>
      <mkdir dir="${prepare.css}"/>
      <copy todir="${prepare.css}">
         <fileset dir="${webapp.css}"/>
      <mkdir dir="${prepare.img}"/>
      <copy todir="${prepare.img}">
         <fileset dir="${webapp.img}"/>
      <mkdir dir="${prepare.dtd}"/>
      <copy todir="${prepare.dtd}">
         <fileset dir="${webapp.dtd}"/>
      <mkdir dir="${prepare.js}"/>
      <copy todir="${prepare.js}">
         <fileset dir="${webapp.js}"/>
      <mkdir dir="${prepare.lib}"/>
      <!-- all the libraries we use -->
      <copy file="${postgres.jar}"        todir="${prepare.lib}" />
      <copy file="${log4j.jar}"           todir="${prepare.lib}" />

      <!-- to use in production -->
      <copy    todir="${deploy.conf}/lib">
        <fileset dir="${build.dir}/${name}.jar">
      <!-- while developing  -->
      <mkdir dir="${prepare.classes}"/>
      <copy todir="${prepare.classes}">
        <fileset dir="${build.dir}/classes"/>

    <!-- Copy the contents of the prepare directory -->
    <mkdir     dir="${deploy.home}"/>
    <copy    todir="${deploy.home}">
      <fileset dir="${prepare.home}"/>
    <!-- this libraries go to the endorsed dir -->
    <copy file="${xerces.jar}" todir="${deploy.endorsed}" />
    <copy file="${xalan.jar}"  todir="${deploy.endorsed}" />


and the relevant properties are:
    <property name="name" value="myServlets"/>
    <property name=""       value="${name}"/>
    <property name="catalina.home"     value="/var/tomcat4/"/> 
    <property name="catalina.lib"      value="${catalina.home}/lib"/> 
    <property name="deploy.home"      
    <property name="deploy.endorsed"  
    <property name="prepare.home"      value="${build.dir}/prepare"/>
    <property name="prepare.conf"      value="${prepare.home}/WEB-INF"/>
    <property name="prepare.css"       value="${prepare.home}/css"/>
    <property name="prepare.img"       value="${prepare.home}/img"/>
    <property name="prepare.dtd"       value="${prepare.home}/dtd"/>
    <property name="prepare.js"        value="${prepare.home}/js"/>
    <property name="prepare.lib"       value="${prepare.conf}/lib"/>
    <property name="prepare.classes"   value="${prepare.conf}/classes"/>
    <property name="webapp.conf"       value="./web/WEB-INF"/>
    <property name="webapp.css"        value="./src/css"/>
    <property name="webapp.img"        value="./src/img"/>
    <property name="webapp.dtd"        value="./src/dtd"/>
    <property name="webapp.js"         value="./src/js"/>

hope it helps ...

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message