Rev 1014 | Rev 1043 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<project name="hostadmiral" default="deploy" basedir=".">
<!--property name="build.compiler" value="jikes" /-->
<property name="src" location="src" />
<property name="classes" location="classes" />
<property name="app.web-inf" location="webapp/WEB-INF" />
<property name="classes.deploy" location="${app.web-inf}/classes" />
<property name="conf" location="conf" />
<property name="lib" location="lib" />
<property name="lib.ant" location="lib/ant" />
<property name="lib.deploy" location="${app.web-inf}/lib" />
<property name="classpath" value="" />
<path id="classpath.general">
<pathelement path="${classpath}" />
<fileset dir="${lib.deploy}">
<include name="*.jar" />
</fileset>
</path>
<path id="classpath.test">
<path refid="classpath.general" />
<pathelement location="${classes.deploy}" />
</path>
<path id="classpath.compile">
<path refid="classpath.general" />
<pathelement location="${classes}" />
<fileset dir="${lib}">
<include name="**/*.jar" />
<exclude name="ant/" />
</fileset>
</path>
<path id="classpath.ant">
<fileset dir="${lib.ant}">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask">
<classpath refid="classpath.ant"/>
</taskdef>
<target name="compile">
<mkdir dir="${classes}" />
<javac
srcdir="${src}"
destdir="${classes}"
classpathref="classpath.compile"
debug="on"
nowarn="on"
/>
</target>
<target name="hibernate">
<hibernatedoclet
destdir="${classes}"
excludedtags="@version,@author,@todo"
mergedir="${classes}"
verbose="false"
>
<fileset dir="src">
<include name="**/*.java" />
<exclude name="ak/hostadmiral/core/servlet/*.java" />
</fileset>
<hibernate version="2.0" />
</hibernatedoclet>
</target>
<target name="deploy" depends="compile,hibernate">
<copy todir="${classes.deploy}">
<fileset dir="${classes}" />
</copy>
<!-- set build number -->
<exec executable="svnversion" logError="true" outputproperty="svn.revision">
<arg value="-n" />
<arg path="." />
</exec>
<copy todir="${classes.deploy}" overwrite="true">
<fileset dir="${src}">
<include name="ak/hostadmiral/version" />
</fileset>
<filterset>
<filter token="BUILD" value="${svn.revision}"/>
</filterset>
</copy>
<copy todir="${classes.deploy}">
<fileset
dir="${classes}"
includes="**/*.xml"
/>
</copy>
<copy todir="${app.web-inf}" flatten="yes">
<fileset
dir="${src}"
includes="**/*.tld"
/>
</copy>
<native2ascii
encoding="UTF8"
src="${src}"
dest="${classes.deploy}"
includes="**/*.properties"
/>
<copy todir="${classes.deploy}" file="${conf}/log4j.properties" />
<copy todir="${classes.deploy}" file="${conf}/hibernate.cfg.xml" />
<touch file="${app.web-inf}/web.xml" />
</target>
<target name="clean">
<delete dir="${classes}"/>
<delete dir="${classes.deploy}"/>
</target>
<target name="all" depends="clean,deploy" />
<target name="test" depends="deploy">
<java
classname="ak.hostadmiral.core.model.test.Test"
classpathref="classpath.test"
/>
</target>
</project>