view build.xml @ 60:b3f3b42b9933

Cache generated files. The files are now generated into distinct subdirectories and moved into the main directory before being returned to the client.
author Chris Cannam
date Thu, 27 Mar 2014 17:35:18 +0000
parents b27106b380d8
children c3d749d029ee
line wrap: on
line source
<project name="EchoWebApp" default="build-war" basedir=".">
  <description>
    Simple build file for the EchoLocation WebApp.
  </description>

  <!-- set global properties for this build -->
  <property name="lib" location="WebContent/WEB-INF/lib"/>
  <property name="data.dir" location="WebContent/WEB-INF/data"/>
  <property name="class.dir" location="WebContent/WEB-INF/classes"/>
  <property name="src" location="src"/>
  <property name="mcode.dir" location="mcode"/>
  <property name="web.dir" location="WebContent"/>
  <property name="war.file"  location="echoapp.war"/>

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
  </target>

  <target name="build">
    <javac srcdir="${src}" destdir="${class.dir}" classpath="servlet-api.jar:${lib}/javabuilder.jar:${lib}/isvr.jar:${lib}/log4j-1.2.17.jar" includeantruntime="false"/>
  </target>

  <target name="ir">
    <copy file="${mcode.dir}/hrir_final.mat" todir="${data.dir}"/>
  </target>

  <target name="build-war" depends="build,ir"
        description="generate the WAR file" >
    <war destfile="${war.file}" webxml="${web.dir}/WEB-INF/web.xml">
      <fileset dir="${web.dir}">
        <exclude name="${web.dir}/WEB-INF/web.xml" />
      </fileset>
    </war>
  </target>

  <target name="clean" description="clean up" >
    <delete file="${war.file}"/>
    <delete>
      <fileset dir="${class.dir}">
        <include name="*.class"/>
      </fileset>
    </delete>
  </target>

</project>