tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arturo Vazquez <...@ciencias.unam.mx>
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
a
    location required by our servlet container, and picks up any
external
    dependencies along the way.  AFter restarting the servlet container,
you
    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}"/>
      </copy>
      <mkdir dir="${prepare.css}"/>
      <copy todir="${prepare.css}">
         <fileset dir="${webapp.css}"/>
      </copy>
      <mkdir dir="${prepare.img}"/>
      <copy todir="${prepare.img}">
         <fileset dir="${webapp.img}"/>
      </copy>
      <mkdir dir="${prepare.dtd}"/>
      <copy todir="${prepare.dtd}">
         <fileset dir="${webapp.dtd}"/>
      </copy>
      <mkdir dir="${prepare.js}"/>
      <copy todir="${prepare.js}">
         <fileset dir="${webapp.js}"/>
      </copy>
      <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">
      </copy>
-->
      <!-- while developing  -->
      <mkdir dir="${prepare.classes}"/>
      <copy todir="${prepare.classes}">
        <fileset dir="${build.dir}/classes"/>
      </copy>

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

    </target>


and the relevant properties are:
    <property name="name" value="myServlets"/>
    <property name="webapp.name"       value="${name}"/>
    <property name="catalina.home"     value="/var/tomcat4/"/> 
    <property name="catalina.lib"      value="${catalina.home}/lib"/> 
    <property name="deploy.home"      
value="${catalina.home}/webapps/${webapp.name}"/>
    <property name="deploy.endorsed"  
value="${catalina.home}/common/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 ...
					VAZ



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message