49 lines
1.4 KiB
XML
49 lines
1.4 KiB
XML
<project name="hibernate-tutorial" default="compile">
|
|
|
|
<property name="sourcedir" value="${basedir}/src"/>
|
|
<property name="targetdir" value="${basedir}/bin"/>
|
|
<property name="librarydir" value="${basedir}/lib"/>
|
|
|
|
<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"/>
|
|
</target>
|
|
|
|
<target name="copy-resources">
|
|
<copy todir="${targetdir}">
|
|
<fileset dir="${sourcedir}">
|
|
<exclude name="**/*.java"/>
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="run" depends="compile">
|
|
<java fork="true" classname="events.EventManager" classpathref="libraries">
|
|
<classpath path="${targetdir}"/>
|
|
<arg value="${action}"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="war" depends="compile">
|
|
<war destfile="hibernate-tutorial.war" webxml="web.xml">
|
|
<lib dir="${librarydir}">
|
|
<exclude name="jsdk*.jar"/>
|
|
</lib>
|
|
|
|
<classes dir="${targetdir}"/>
|
|
</war>
|
|
</target>
|
|
|
|
</project> |