<!--build.xml-->
<?xml version="1.0" encoding="UTF-8"?>
<!-- =================================================================== -->
<!-- $Id: build.xml,v 1.1.1.1 2007/01/08 07:34:10 doss_zp Exp $ -->
<!-- =================================================================== -->
<project name="dosscollect" basedir=".">
<tstamp>
<format property="build.time" pattern="yyyy-MM-dd.HH.mm.ss"/>
</tstamp>
<property file="build.properties"/>
<property environment="env"/>
<property name="ant.home" value="${env.ANT_HOME}"/>
<path id="base.classpath">
<fileset dir="${lib.dir}">
<include name="classes12.jar"/>
<include name="commons-logging-1.0.3.jar"/>
<include name="commons-collections-2.1.jar"/>
<include name="commons-dbcp-1.1.jar"/>
<include name="commons-pool-1.1.jar"/>
<include name="jdom.jar"/>
<include name="jsp-api.jar"/>
<include name="jxl.jar"/>
<include name="log4j-1.2.8.jar"/>
<include name="servlet-api.jar"/>
<include name="spring-1.2.6.jar"/>
</fileset>
<pathelement location="${classes.dir}"/>
</path>
<!-- target: clean -->
<target name="clean">
<delete dir="${classes.dir}"/>
<delete dir="${webinf.dir}/lib"/>
<delete dir="${dist.dir}"/>
</target>
<!-- target: init -->
<target name="init">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${webinf.dir}/lib"/>
</target>
<target name="resources">
<copy todir="${classes.dir}" includeEmptyDirs="no">
<fileset dir="${src.dir}">
<patternset>
<include name="META-INF/**" />
</patternset>
</fileset>
<fileset dir="${config.dir}">
<patternset>
<include name="doss_spring.xml" />
<include name="log4j.properties" />
<include name="jdbc.properties" />
</patternset>
</fileset>
</copy>
<copy todir="${webinf.dir}/lib" includeEmptyDirs="no">
<fileset dir="${lib.dir}">
<include name="classes12.jar"/>
<include name="commons-logging-1.0.3.jar"/>
<include name="commons-collections-2.1.jar"/>
<include name="commons-dbcp-1.1.jar"/>
<include name="commons-pool-1.1.jar"/>
<include name="jdom.jar"/>
<include name="jsp-api.jar"/>
<include name="jxl.jar"/>
<include name="log4j-1.2.8.jar"/>
<include name="servlet-api.jar"/>
<include name="spring-1.2.6.jar"/>
</fileset>
</copy>
</target>
<!-- target: compile-java -->
<target name="compile-java" depends="clean,init,resources" >
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="${build.debug}" encoding="${encoding}"
includes="com/stt/doss/datacollect/**/**">
<classpath>
<path refid="base.classpath" />
</classpath>
</javac>
</target>
<!-- target: war-->
<target name="war" depends="compile-java">
<makewar project.module="${project.module.dosscollect}"/>
</target>
<!-- macrodef: makewar -->
<macrodef name="makewar">
<attribute name="project.module"/>
<sequential>
<delete dir="${dist.dir}"/>
<mkdir dir="${dist.dir}"/>
<war basedir="${basedir}" destfile="${dist.dir}/@{project.module}.war"
webxml="${webinf.dir}/web.xml">
<exclude name="config/*.*"/>
<exclude name="lib/*.*"/>
<exclude name="src/**/*.*"/>
<exclude name="**/*.vss"/>
<exclude name="**/build.xml"/>
<exclude name="**/build.bat"/>
<exclude name="**/build.properties"/>
</war>
</sequential>
</macrodef>
</project>
<!--build.properties-->
project.name=dosscollect
project.module.dosscollect=dosscollect
webinf.dir=${basedir}/WEB-INF
dist.dir=${basedir}/dist
build.dir=${basedir}/build
classes.dir=${webinf.dir}/classes
src.dir=src
lib.dir=lib
config.dir=${basedir}/config
build.debug=on
encoding=GB2312
<!--build.bat-->
ant war