Mercurial > hg > human-echolocation-java-webapp
view build.xml @ 13:02c01c48cec1
created an example page to test the servlet; updated the web.xml deployment descriptor to reflect the servlet naming
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Fri, 29 Nov 2013 16:30:13 +0000 |
parents | 594fcd75a5ed |
children | 33d7bd3c0990 |
line wrap: on
line source
<project name="EchoWebApp" default="build" basedir="."> <description> Simple build file for the EchoLocation WebApp. </description> <!-- set global properties for this build --> <property name="matlab-src" location="webapp/WEB-INF/mcode/human-echolocation"/> <property name="matlab-build" location="scratch"/> <property name="lib" location="webapp/WEB-INF/lib"/> <property name="src" location="webapp/WEB-INF/src"/> <property name="classes" location="webapp/WEB-INF/classes"/> <property name="web.dir" location="webapp"/> <property name="war.file" location="echoapp.war"/> <uptodate property="matlabCompile.notRequired" targetfile="${matlab-build}/isvr.jar" > <srcfiles dir= "${matlab-src}" includes="*.m"/> <srcfiles dir= "${matlab-src}/private" includes="*.m"/> </uptodate> <uptodate property="warBuild.notRequired" targetfile="${war.file}" > <srcfiles dir= "${classes}" includes="*.class"/> <srcfiles dir= "${web.dir}" includes="*.jsp"/> <srcfiles dir= "${web.dir}/WEB-INF" includes="*.jsp"/> <srcfiles dir= "${web.dir}/WEB-INF" includes="*.css"/> <srcfiles dir= "${web.dir}/WEB-INF/" includes="*.xml" /> </uptodate> <target name="init"> <!-- Create the time stamp --> <tstamp/> <!-- Create the build directory structure used by compile --> <mkdir dir="${matlab-build}"/> </target> <target name="compile-matlab" depends="init" unless="matlabCompile.notRequired" description="compile the MATLAB source" > <exec executable="/Applications/MATLAB_R2013b.app/bin/mcc"> <!-- Will create the java package with the HumanEcho class --> <arg line='-W "java:uk.ac.soton.isvr,HumanEcho" -d ${matlab-build} -T "link:lib" -v "class{HumanEcho:${matlab-src}/simulateBinauralSignals.m}"'/> </exec> <!-- Copy the generated jar to the lib folder --> <copy file="${matlab-build}/isvr.jar" tofile="${lib}/isvr.jar" overwrite="true" /> </target> <target name="build" depends="compile-matlab"> <javac srcdir="${src}" destdir="${classes}" classpath="servlet-api.jar:${lib}/javabuilder.jar:${lib}/isvr.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>