1.create a build.xml in webContent as follows
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
Build file for 'GEDA'
Creation date : 2010-6-21
Updated date : 2010-11-3
Author : Lester Hao
Copyright 2010 ThomsonReuters, Inc. All rights reserved.
====================================================================== -->
<project name="GEDA" default="war">
<import file="properties.xml" /><taskdef resource="org/apache/catalina/ant/catalina.tasks" classpathref="deployer.classpath" />
<target name="clean">
<delete dir="build" />
<delete dir="dist" />
</target><target name="compile" depends="clean">
<mkdir dir="build/classes" />
<javac srcdir="src" destdir="build/classes" target="1.6" source="1.6" debug="true" classpathref="full.lib.path" encoding="UTF-8" />
<copy todir="build/classes">
<fileset dir="src">
<exclude name="**/*.java" />
<exclude name="**/.svn" />
</fileset>
<fileset dir="resources">
<exclude name="**/*-test.xml" />
<exclude name="**/.svn" />
</fileset>
</copy>
</target><target name="compile-test" depends="compile">
<mkdir dir="build/classes" />
<javac srcdir="test" destdir="build/classes" target="1.6" source="1.6" debug="true" classpathref="full.lib.path" encoding="UTF-8" />
<copy todir="build/classes">
<fileset dir="ut">
<exclude name="**/*.java" />
<exclude name="**/.svn" />
</fileset>
<fileset dir="resources">
<include name="**/*-test.xml" />
<exclude name="**/.svn" />
</fileset>
</copy>
</target>
<target name="jar" depends="compile">
<mkdir dir="dist" />
<mkdir dir="build/metadata/META-INF" />
<jar destfile="dist/${distribution.name}.jar" basedir="build/classes">
<metainf dir="build/metadata/META-INF/" />
</jar>
</target>
<target name="war" depends="jar">
<copy file="WebContent/bundles/messages-MigrationTool.properties" tofile="WebContent/bundles/messages-MigrationTool_en-US.properties" overwrite="true" />
<copy file="WebContent/bundles/messages-IFFM.properties" tofile="WebContent/bundles/messages-IFFM_en-US.properties" overwrite="true" />
<war destfile="dist/${webapp.name}.war" webxml="WebContent/WEB-INF/web.xml">
<fileset refid="web.path" />
<classes dir="build/classes" />
<webinf dir="WebContent/WEB-INF" includes="schema/**"/>
</war>
</target>
<target name="refresh">
<antcall target="clean" />
<antcall target="war" />
</target>
<target name="deploy" description="Install application in Tomcat" depends="war">
<deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${context-path}" war="dist/${webapp.name}.war" update="true" />
<echo message="complete deploy">
</echo>
</target>
<target name="deploy-local" description="Install application to Local Tomcat" depends="war">
<copy todir="${tomcat.webapps}">
<fileset dir="dist">
<include name="*.war" />
</fileset>
</copy>
</target>
<target name="undeploy" description="Remove application in Tomcat" if="already.deployed" depends="stop">
<undeploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${context-path}" />
</target>
<!-- deploy into local tomcat webapps-->
<target name="deploy-web" if="tomcat.home" description="copy jsp and resource into the servlet container's deployment directory">
<copy todir="${tomcat.home}/webapps/${webapp.name}/">
<fileset refid="web.path" />
</copy>
</target>
<target name="reload" description="Reload application in Tomcat">
<reload url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${context-path}" />
</target>
<target name="start" description="Start Tomcat application" if="already.deployed">
<start url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${context-path}" />
</target>
<target name="stop" description="Stop Tomcat application" if="already.deployed">
<stop url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${context-path}" />
</target>
<target name="list" description="List Tomcat applications">
<list url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" />
</target>
<target name="document" depends="compile">
<mkdir dir="build/apidocs" />
<javadoc sourcepath="src" destdir="build/apidocs" packagenames="com.${company.name}.*" classpathref="full.lib.path" encoding="UTF-8" />
<zip destfile="docs/${distribution.name}-apidoc.zip" basedir="build/apidocs" update="true" />
</target>
<target name="ftp">
<ftp server="${ftp.server}" remotedir="${ftp.remotedir}" userid="${ftp.user}" password="${ftp.password}" depends="yes">
<fileset refid="ftp.path" />
</ftp>
</target></project>
2.create a build.properties in webContent as follows
tomcat.home=D:\\bak\\tomcat6.0.13
tomcat.manager.url=http://192.111.63.10:8080/manager
tomcat.manager.username=tomcat
tomcat.manager.password=tomcat
project.name=GEDA
3.create a properties.xml in webContent as follows
<?xml version="1.0" encoding="UTF-8"?>
<project>
<property file="build.properties" />
<property environment="env" />
<property name="company.name" value="IBC" />
<!--
<property name="project.name" value="GEDA" />
-->
<property name="version" value="1.0" />
<property name="distribution.name" value="${company.name}-${project.name}-${version}" />
<property name="webapp.name" value="${project.name}" />
<property name="context-path" value="/${webapp.name}" />
<!-- configure the file path -->
<path id="devtime.lib.path">
<fileset dir="lib" includes="devtime/**/*.jar" />
</path>
<path id="deployer.classpath">
<fileset dir="${tomcat.home}/lib">
<include name="**/*.jar" />
</fileset>
<path refid="devtime.lib.path" />
</path>
<path id="full.lib.path">
<fileset dir="WebContent" includes="WEB-INF/**/*.jar" />
<path refid="deployer.classpath" />
</path>
<fileset id="web.path" dir="WebContent">
<exclude name="WEB-INF/**/*.*" />
</fileset>
<fileset id="ftp.path" dir="dist">
<exclude name="*.war" />
</fileset>
<property name="ftp.server" value="sdd01a" />
<property name="ftp.remotedir" value="/u05/workarea/lester" />
<property name="ftp.user" value="gedasp" />
<property name="ftp.password" value="gedasp" />
</project>