<?xml version="1.0" encoding="gb2312"?>
<project name="project" default="clean" basedir=".">
<description> description </description>
<property name="src.dir" value="src"></property>
<property name="lib.dir" value="lib"></property>
<!--app build directory-->
<property name="build.dir" value="build"></property>
<property name="build.classes.dir" value="${build.dir}/classes"></property>
<!--app dist directory-->
<property name="dist.dir" value="dist"></property>
<property name="dist.bin.dir" value="${dist.dir}/bin"></property>
<property name="dist.lib.dir" value="${dist.dir}/lib"></property>
<!--app doc directory-->
<property name="doc.dir" value="doc"></property>
<!--configure directory-->
<property name="src.conf.dir" value="${src.dir}/conf"></property>
<property name="src.icons.dir" value="${src.dir}/icons"></property>
<property name="src.taskconfig.dir" value="${src.dir}/taskconfig"></property>
<property name="dest.conf.dir" value="${dist.bin.dir}/conf"></property>
<property name="dest.icons.dir" value="${dist.bin.dir}/icons"></property>
<property name="dest.taskconfig.dir" value="${dist.bin.dir}/taskconfig"></property>
<path id="master-classpath">
<fileset dir="${lib.dir}/xml">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}/thread">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}/ie">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}/junit">
<include name="*.jar"/>
</fileset> </path>
<!--usage-->
<target name="usage">
<echo message="------------------------------"/>
<echo message="library in ${lib.dir}"/>
<echo message="build ${src.dir} => ${build.classes.dir}"/>
<echo message="jar ${build.classes.dir} => ${dist.bin.dir}"/>
<echo message="javadoc => ${doc.dir}"/>
<echo message="------------------------------"/>
</target>
<!--init-->
<target name="init">
</target>
<!--build-->
<target name="build" depends="init" description="Build the source file">
<mkdir dir="${build.classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${build.classes.dir}" deprecation="" classpath="../lib" target="1.4">
<classpath refid="master-classpath"/>
<exclude name="Test*.java"/>
</javac>
</target>
<!--jar-->
<target name="jar" depends="build" description="Pack the project">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.bin.dir}"/>
<mkdir dir="${dist.lib.dir}"/>
<jar destfile="${dist.bin.dir}/GetWebTable.jar" basedir="${build.classes.dir}">
<exclude name="Test*"/>
<manifest>
<attribute name="Main-Class" value="org.indigo.application.WebApp"/>
</manifest>
</jar>
<mkdir dir="${dest.conf.dir}"/>
<mkdir dir="${dest.icons.dir}"/>
<mkdir dir="${dest.taskconfig.dir}"/>
<copydir dest="${dest.conf.dir}" src="${src.conf.dir}"/>
<copydir dest="${dest.icons.dir}" src="${src.icons.dir}"/>
<copydir dest="${dest.taskconfig.dir}" src="${src.taskconfig.dir}"/>
<copydir dest="${dist.lib.dir}/xml" src="${lib.dir}/xml"></copydir>
<copydir dest="${dist.lib.dir}/thread" src="${lib.dir}/thread"></copydir>
<copydir dest="${dist.lib.dir}/ie" src="${lib.dir}/ie"></copydir>
<copydir dest="${dist.lib.dir}/junit" src="${lib.dir}/junit"></copydir>
</target>
<!--jar a single file-->
<target name="jarsingle" depends="build" description="Pack the project into a single jar">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.bin.dir}"/>
<unzip dest="${build.classes.dir}">
<fileset dir="${lib.dir}/xml">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}/thread">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}/junit">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}/ie">
<include name="*.jar"/>
</fileset>
</unzip>
<jar destfile="${dist.bin.dir}/GetWebTable.jar" basedir="${build.classes.dir}">
<exclude name="Test*"/>
<manifest>
<attribute name="Main-Class" value="org.indigo.application.WebApp"/>
</manifest>
</jar>
<mkdir dir="${dest.conf.dir}"/>
<mkdir dir="${dest.icons.dir}"/>
<mkdir dir="${dest.taskconfig.dir}"/>
<copydir dest="${dest.conf.dir}" src="${src.conf.dir}"/>
<copydir dest="${dest.icons.dir}" src="${src.icons.dir}"/>
<copydir dest="${dest.taskconfig.dir}" src="${src.taskconfig.dir}"/>
</target>
<!--all-->
<target name="all">
</target>
<!--clean-->
<target name="clean">
<delete includeemptydirs="true">
<fileset dir="${build.dir}"/>
<fileset dir="${dist.dir}"/>
</delete>
</target>
</project>