2011-04-14
<?xml version="1.0" encoding="UTF-8"?>
<project name="bbs" default="war">
<property name="sourcedir" value="../src"/>
<property name="targetdir" value="../build"/>
<property name="librarydir" value="../lib"/>
<property name="jspdir" value="../WebRoot"/>
<property name="xmldir" value="../WebRoot/WEB-INF/web.xml"/>
<path id="libraries">
<fileset dir="${librarydir}">
<include name="*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="${targetdir}" />
<mkdir dir="${targetdir}" />
</target>
<target name="compile" depends="clean,copy-resources">
<javac srcdir="${sourcedir}"
destdir="${targetdir}"
classpathref="libraries"
includeantruntime="false"/>
</target>
<target name="copy-resources">
<copy todir="${targetdir}">
<fileset dir="${sourcedir}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="war" depends="compile">
<war destfile="BBS.war" webxml="${xmldir}">
<lib dir="${librarydir}">
<exclude name="servlet-api.jar"/>
</lib>
<fileset dir="${jspdir}">
<include name="**/*.jsp" />
</fileset>
<classes dir="${targetdir}" />
</war>
</target>
</project>