2008-03-02 12:02:37 -05:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
2007-12-23 14:28:04 -05:00
|
|
|
<project name="FileBot" basedir="." default="fatjar">
|
|
|
|
|
|
|
|
<property name="title" value="${ant.project.name}" />
|
2008-06-09 14:41:06 -04:00
|
|
|
<property name="version" value="1.9" />
|
2007-12-23 14:28:04 -05:00
|
|
|
|
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
<property name="dir.source" location="${basedir}/source" />
|
|
|
|
<property name="dir.test" location="${basedir}/test" />
|
|
|
|
<property name="dir.build" location="${basedir}/build" />
|
|
|
|
<property name="dir.lib" location="${basedir}/lib" />
|
2007-12-23 14:28:04 -05:00
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
<property name="executable" location="${dir.build}/${title}.jar" />
|
2008-02-13 15:08:06 -05:00
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
<property name="lib.xerces" value="${dir.lib}/xercesImpl.jar" />
|
|
|
|
<property name="lib.nekohtml" value="${dir.lib}/nekohtml-1.9.7.jar" />
|
|
|
|
<property name="lib.simmetrics" value="${dir.lib}/simmetrics_jar_v1_6_2_d07_02_07.jar" />
|
|
|
|
<property name="lib.xmlrpc" value="${dir.lib}/xmlrpc-client-1.1.jar" />
|
|
|
|
<property name="lib.glazedlists" value="${dir.lib}/glazedlists-1.7.0_java15.jar" />
|
|
|
|
<property name="lib.junit" value="${dir.lib}/junit-4.4.jar" />
|
2007-12-23 14:28:04 -05:00
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
<target name="fatjar" depends="clean, build">
|
2007-12-23 14:28:04 -05:00
|
|
|
<jar destfile="${executable}" duplicate="fail">
|
2008-06-09 14:41:06 -04:00
|
|
|
<fileset dir="${dir.build}" />
|
2007-12-23 14:28:04 -05:00
|
|
|
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Built-By" value="${user.name}" />
|
|
|
|
<attribute name="Main-Class" value="Main" />
|
|
|
|
<attribute name="Version" value="${version}" />
|
|
|
|
</manifest>
|
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
|
|
|
|
<!-- include libs -->
|
|
|
|
<zipfileset src="${lib.xerces}">
|
|
|
|
<include name="org/apache/html/dom/**" />
|
|
|
|
<include name="org/apache/xerces/dom/**" />
|
|
|
|
<include name="org/apache/xerces/impl/**" />
|
|
|
|
<include name="org/apache/xerces/parsers/**" />
|
|
|
|
<include name="org/apache/xerces/util/**" />
|
|
|
|
<include name="org/apache/xerces/xni/**" />
|
|
|
|
<include name="org/apache/xerces/xs/**" />
|
2007-12-23 14:28:04 -05:00
|
|
|
</zipfileset>
|
2008-06-02 15:12:28 -04:00
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
<zipfileset src="${lib.nekohtml}">
|
|
|
|
<include name="**/*.class" />
|
|
|
|
<include name="**/*.properties" />
|
2008-02-13 15:08:06 -05:00
|
|
|
</zipfileset>
|
2008-06-09 14:41:06 -04:00
|
|
|
|
|
|
|
<zipfileset src="${lib.simmetrics}">
|
|
|
|
<include name="uk/ac/shef/wit/simmetrics/math/**" />
|
|
|
|
<include name="uk/ac/shef/wit/simmetrics/similaritymetrics/**" />
|
|
|
|
<include name="uk/ac/shef/wit/simmetrics/tokenisers/**" />
|
|
|
|
<include name="uk/ac/shef/wit/simmetrics/wordhandlers/**" />
|
|
|
|
</zipfileset>
|
|
|
|
|
|
|
|
<zipfileset src="${lib.xmlrpc}">
|
|
|
|
<include name="**/*.class" />
|
2008-02-13 15:08:06 -05:00
|
|
|
</zipfileset>
|
2008-06-02 15:12:28 -04:00
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
<zipfileset src="${lib.glazedlists}">
|
2008-06-29 13:38:57 -04:00
|
|
|
<include name="ca/odell/glazedlists/**" />
|
2008-02-13 15:08:06 -05:00
|
|
|
</zipfileset>
|
2007-12-23 14:28:04 -05:00
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
<target name="build">
|
2007-12-23 14:28:04 -05:00
|
|
|
<!-- create build dir -->
|
2008-06-09 14:41:06 -04:00
|
|
|
<mkdir dir="${dir.build}" />
|
2007-12-23 14:28:04 -05:00
|
|
|
|
|
|
|
<!-- compile -->
|
2008-06-09 14:41:06 -04:00
|
|
|
<javac srcdir="${dir.source}" destdir="${dir.build}">
|
2007-12-23 14:28:04 -05:00
|
|
|
<classpath>
|
2008-06-09 14:41:06 -04:00
|
|
|
<fileset dir="${dir.lib}" includes="*.jar" />
|
2007-12-23 14:28:04 -05:00
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<!-- copy resources -->
|
2008-06-09 14:41:06 -04:00
|
|
|
<copy todir="${dir.build}">
|
|
|
|
<fileset dir="${dir.source}">
|
2007-12-23 14:28:04 -05:00
|
|
|
<include name="**/*.png" />
|
|
|
|
<include name="**/*.gif" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
2008-06-09 14:41:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
<target name="build-test" depends="build">
|
|
|
|
<javac srcdir="${dir.test}" destdir="${dir.build}">
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${dir.lib}" includes="*.jar" />
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
</target>
|
2007-12-23 14:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
<target name="clean">
|
2008-06-09 14:41:06 -04:00
|
|
|
<delete file="${executable}" verbose="yes" />
|
|
|
|
<delete dir="${dir.build}" />
|
2007-12-23 14:28:04 -05:00
|
|
|
</target>
|
2008-06-09 14:41:06 -04:00
|
|
|
|
2007-12-23 14:28:04 -05:00
|
|
|
|
2008-06-09 14:41:06 -04:00
|
|
|
<target name="test" depends="clean, build-test, fatjar">
|
|
|
|
<junit printsummary="yes" fork="yes">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${executable}"/>
|
|
|
|
<pathelement location="${lib.junit}"/>
|
|
|
|
</classpath>
|
|
|
|
|
|
|
|
<formatter type="plain" />
|
|
|
|
|
|
|
|
<test name="AllTests" outfile="test-report" />
|
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2007-12-23 14:28:04 -05:00
|
|
|
<target name="run" depends="fatjar">
|
2008-06-09 14:41:06 -04:00
|
|
|
<java jar="${executable}" fork="yes" />
|
2007-12-23 14:28:04 -05:00
|
|
|
</target>
|
2008-03-02 12:02:37 -05:00
|
|
|
|
|
|
|
</project>
|