view build.xml @ 34:3fead3e53b4a

Split the build file in two: build.xml (default) and build-isvr.xml (which assumes you have the isvr.jar file avaiulable). Changed the installation intructions accordingly.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 10 Dec 2013 18:43:20 +0000
parents 0d53c4d80b73
children b32c3bd9eb89
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="src" location="src"/>
  <property name="classes" location="WebContent/WEB-INF/classes"/>
  <property name="web.dir" location="WebContent"/>
  <property name="war.file"  location="echoapp.war"/>

  <uptodate property="warBuild.notRequired" targetfile="${war.file}" >
    <srcfiles dir= "${classes}" includes="*.class"/>
    <srcfiles dir= "${src}" includes="*.java" />
    <srcfiles dir= "${web.dir}" includes="*.jsp"/>
    <srcfiles dir= "${web.dir}" includes="*.css"/>
    <srcfiles dir= "${web.dir}" includes="*.xml" />
  </uptodate>

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

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

  <target name="build-war" depends="build"
        description="generate the WAR file" unless="warBuild.notRequired">
    <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 the ${build} and ${dist} directory trees -->
    <delete dir="${build}"/>
  </target>
</project>