<property name="project.name" value="Procname" />
<property name="java.src" value="src" />
<property name="web.dir" value="${basedir}/web" />
<property name="webinf.dir" value="${web.dir}/WEB-INF" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="build.dir" value="${dist.dir}/build" />
<property name="build.java.dir" value="${build.dir}/java" />
<property name="javadoc.dir" value="${dist.dir}/javadoc" />
<path id="main.classpath">
<fileset dir="${webinf.dir}/lib">
<include name="*.jar" />
</fileset>
<path location="${build.java.dir}" />
</path>
<target name="init" depends="clean">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.java.dir}" />
<copy todir="${build.java.dir}">
<fileset dir="${java.src}">
<include name="**/*.properties" />
</fileset>
</copy>
</target>
<target name="compile" depends="init">
<javac destdir="${build.java.dir}" classpathref="main.classpath" nowarn="false" encoding="UTF-8">
<src path="${java.src}" />
</javac>
</target>
<target name="javadoc" depends="init">
<mkdir dir="${javadoc.dir}" />
<javadoc destdir="${javadoc.dir}" sourcepath="${java.src}" doctitle="CAIT rescenter SDK API Documentation" encoding="UTF-8" charset="UTF-8">
<fileset dir="${java.src}">
<include name="com/cait/rescenter/webui/service/ResCenterApi2.java" />
</fileset>
<classpath refid="main.classpath" />
</javadoc>
</target>
<target name="dist" depends="compile">
<jar jarfile="${dist.dir}/${project.name}.jar">
<fileset dir="${build.java.dir}">
<include name="**/*.class" />
<include name="**/*.properties" />
</fileset>
</jar>
</target>
<target name="war" depends="dist">
<copy todir="${webinf.dir}/lib">
<fileset dir="${dist.dir}">
<include name="*.jar" />
</fileset>
</copy>
<war destfile="${dist.dir}/${project.name}.war" webxml="${webinf.dir}/web.xml">
<fileset dir="${web.dir}">
<include name="**/*.*" />
<include name="**/**" />
<exclude name="WEB-INF/classes/com/**" />
<exclude name="WEB-INF/src/**" />
<exclude name="WEB-INF/web.xml" />
</fileset>
</war>
<delete file="${webinf.dir}/lib/${project.name}.jar" />
</target>
<target name="clean">
<delete dir="${dist.dir}" />
</target>
</project>