annotate build.xml @ 4:f6cffd6abce3

copies the generated jar to the correct lib folder.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 27 Nov 2013 17:24:31 +0000
parents 747ae11a8af8
children 83e0c27b4dbc
rev   line source
luis@1 1 <project name="EchoWebApp" default="compile-matlab" basedir=".">
luis@1 2 <description>
luis@1 3 Simple build file for the EchoLocation WebApp.
luis@1 4 </description>
luis@1 5
luis@1 6 <!-- set global properties for this build -->
luis@4 7 <property name="matlab-src" location="webapp/WEB-INF/mcode"/>
luis@4 8 <property name="matlab-build" location="scratch"/>
luis@4 9 <property name="lib" location="webapp/WEB-INF/lib"/>
luis@1 10 <property name="dist" location="dist"/>
luis@1 11
luis@1 12 <target name="init">
luis@1 13 <!-- Create the time stamp -->
luis@1 14 <tstamp/>
luis@1 15 <!-- Create the build directory structure used by compile -->
luis@4 16 <mkdir dir="${matlab-build}"/>
luis@1 17 </target>
luis@1 18
luis@1 19 <target name="compile-matlab" depends="init"
luis@1 20 description="compile the MATLAB source" >
luis@4 21
luis@1 22 <exec executable="/Applications/MATLAB_R2013b.app/bin/mcc">
luis@1 23 <!-- Will create the java package with the HumanEcho class -->
luis@4 24 <arg line='-W "java:uk.ac.soton.isvr,HumanEcho" -d ${matlab-build} -T "link:lib" -v "class{HumanEcho:${matlab-src}/simulateBinauralSignals.m}"'/>
luis@1 25 </exec>
luis@4 26
luis@4 27 <!-- Copy the generated jar to the lib folder -->
luis@4 28 <copy file="${matlab-build}/isvr.jar" tofile="${lib}/isvr.jar" overwrite="true" />
luis@4 29
luis@1 30 </target>
luis@1 31
luis@1 32 <target name="dist" depends="compile-matlab"
luis@1 33 description="generate the distribution" >
luis@1 34 <!-- Create the distribution directory -->
luis@1 35 <mkdir dir="${dist}/lib"/>
luis@1 36
luis@1 37 <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
luis@1 38 <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
luis@1 39 </target>
luis@1 40
luis@1 41 <target name="clean"
luis@1 42 description="clean up" >
luis@1 43 <!-- Delete the ${build} and ${dist} directory trees -->
luis@1 44 <delete dir="${build}"/>
luis@1 45 <delete dir="${dist}"/>
luis@1 46 </target>
luis@1 47 </project>