NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-002
B-1
B Sample Ant Script for the 
Client Deployer
Example B-1. Sample Ant Script for the Client Deployer
- <project name="Deployer" default="compile" basedir=".">
 <property file="deployer.properties" /> 
 - <!-- 
 Configure the directory into which the web application is built 
 --> 
 <property name="build" value="${basedir}/build" /> 
 - <!-- 
 Configure the folder and context path for this application 
 --> 
 <property name="webapp" value="myapp" /> 
 <property name="path" value="/myapp" /> 
 - <!-- 
 Configure properties to access the Manager application 
 --> 
 <property name="host" value="www.mycompany.com" /> 
 <property name="port" value="80" /> 
 <property name="url" value="http://${host}:${port}/manager”/> 
 <property name="username" value="user"/
 <property name="password" value="pass"/
 <property name="webapp.path" value="${build}/${webapp}"/
 - <path id="deployer.classpath">
 - <fileset dir="${basedir}/lib">
  <include name="*.jar" /> 
  </fileset>
 </path>
 - <!-- 
 Configure the custom Ant tasks for the Manager application 
 --> 
 <taskdef resource="org/apache/catalina/ant/catalina.tasks"
  classpathref="deployer.classpath" /> 
 - <!-- 
 Executable Targets
 --> 
 - <target name="clean" description="Removes build directory">
  <delete dir="${build}" /> 
 </target>
 - <target name="compile" description="Compile web application"
  depends="clean"
 - <copy todir="${webapp.path}">
  <fileset dir="${webapp}" /> 
  </copy>
  <jasper2 validateXml="false" uriroot="${webapp.path}"
  webXmlFragment="${webapp.path}/WEB-
  INF/generated_web.xml" addWebXmlMappings="true"
  outputDir="${webapp.path}/WEB-INF/classes" /> 
  <validator path="${webapp.path}" /> 
  <mkdir dir="${webapp.path}/WEB-INF/classes" /> 
  <mkdir dir="${webapp.path}/WEB-INF/lib" /> 
 - <javac destdir="${webapp.path}/WEB-INF/classes"
  optimize="off" debug="on" failonerror="false"
  srcdir="${webapp.path}/WEB-INF/classes"
  encoding=”UTF-8” excludes="**/*.smap">
 - <classpath> 










