2008-03-02 12:02:37 -05:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
2008-07-30 18:37:01 -04:00
|
|
|
<project name="FileBot" default="fatjar">
|
2007-12-23 14:28:04 -05:00
|
|
|
|
|
|
|
<property name="title" value="${ant.project.name}" />
|
2008-10-12 11:46:45 -04:00
|
|
|
<property name="version" value="1.9.0" />
|
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" />
|
2008-07-30 18:37:01 -04:00
|
|
|
<property name="dir.dist" location="${basedir}/dist" />
|
2008-06-09 14:41:06 -04:00
|
|
|
<property name="dir.lib" location="${basedir}/lib" />
|
2007-12-23 14:28:04 -05:00
|
|
|
|
2008-07-30 18:37:01 -04:00
|
|
|
<property name="executable" location="${dir.dist}/${title}.jar" />
|
2008-02-13 15:08:06 -05:00
|
|
|
|
2008-07-30 18:37:01 -04:00
|
|
|
<property name="lib.xerces" location="${dir.lib}/xercesImpl.jar" />
|
|
|
|
<property name="lib.nekohtml" location="${dir.lib}/nekohtml-1.9.7.jar" />
|
|
|
|
<property name="lib.simmetrics" location="${dir.lib}/simmetrics_jar_v1_6_2_d07_02_07.jar" />
|
|
|
|
<property name="lib.xmlrpc" location="${dir.lib}/xmlrpc-client-1.1.jar" />
|
|
|
|
<property name="lib.glazedlists" location="${dir.lib}/glazedlists-1.7.0_java15.jar" />
|
2008-10-12 16:25:23 -04:00
|
|
|
<property name="lib.miglayout" location="${dir.lib}/miglayout-3.6-swing.jar" />
|
2008-07-30 18:37:01 -04:00
|
|
|
<property name="lib.args4j" location="${dir.lib}/args4j-2.0.9.jar" />
|
|
|
|
<property name="lib.junit" location="${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">
|
2008-07-30 18:37:01 -04:00
|
|
|
<!-- create dist dir -->
|
|
|
|
<mkdir dir="${dir.dist}" />
|
|
|
|
|
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>
|
|
|
|
|
2008-10-12 16:25:23 -04:00
|
|
|
<zipfileset src="${lib.glazedlists}">
|
|
|
|
<include name="ca/odell/glazedlists/**" />
|
|
|
|
</zipfileset>
|
|
|
|
|
|
|
|
<zipfileset src="${lib.miglayout}">
|
2008-06-09 14:41:06 -04:00
|
|
|
<include name="**/*.class" />
|
2008-02-13 15:08:06 -05:00
|
|
|
</zipfileset>
|
2008-06-02 15:12:28 -04:00
|
|
|
|
2008-10-12 16:25:23 -04:00
|
|
|
<zipfileset src="${lib.xmlrpc}">
|
|
|
|
<include name="**/*.class" />
|
2008-02-13 15:08:06 -05:00
|
|
|
</zipfileset>
|
2008-10-12 16:25:23 -04:00
|
|
|
|
2008-07-30 18:37:01 -04:00
|
|
|
<zipfileset src="${lib.args4j}">
|
2008-10-12 16:25:23 -04:00
|
|
|
<include name="**/*.class" />
|
2008-07-30 18:37:01 -04: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-07-30 18:37:01 -04:00
|
|
|
<delete dir="${dir.dist}" />
|
2008-06-09 14:41:06 -04:00
|
|
|
<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">
|
2008-07-30 18:37:01 -04:00
|
|
|
<junit printsummary="yes" showoutput="yes">
|
2008-06-09 14:41:06 -04:00
|
|
|
<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>
|