1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 16:35:08 -05:00
filebot/build.xml

135 lines
3.9 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
<project name="FileBot" default="fatjar">
<property name="title" value="${ant.project.name}" />
2008-06-09 14:41:06 -04:00
<property name="version" value="1.9" />
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.dist" location="${basedir}/dist" />
2008-06-09 14:41:06 -04:00
<property name="dir.lib" location="${basedir}/lib" />
<property name="executable" location="${dir.dist}/${title}.jar" />
<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" />
<property name="lib.args4j" location="${dir.lib}/args4j-2.0.9.jar" />
<property name="lib.junit" location="${dir.lib}/junit-4.4.jar" />
2008-06-09 14:41:06 -04:00
<target name="fatjar" depends="clean, build">
<!-- create dist dir -->
<mkdir dir="${dir.dist}" />
<jar destfile="${executable}" duplicate="fail">
2008-06-09 14:41:06 -04:00
<fileset dir="${dir.build}" />
<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/**" />
</zipfileset>
2008-06-09 14:41:06 -04:00
<zipfileset src="${lib.nekohtml}">
<include name="**/*.class" />
<include name="**/*.properties" />
</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" />
</zipfileset>
2008-06-09 14:41:06 -04:00
<zipfileset src="${lib.glazedlists}">
<include name="ca/odell/glazedlists/**" />
</zipfileset>
<zipfileset src="${lib.args4j}">
<include name="*/**" />
</zipfileset>
</jar>
</target>
2008-06-09 14:41:06 -04:00
<target name="build">
<!-- create build dir -->
2008-06-09 14:41:06 -04:00
<mkdir dir="${dir.build}" />
<!-- compile -->
2008-06-09 14:41:06 -04:00
<javac srcdir="${dir.source}" destdir="${dir.build}">
<classpath>
2008-06-09 14:41:06 -04:00
<fileset dir="${dir.lib}" includes="*.jar" />
</classpath>
</javac>
<!-- copy resources -->
2008-06-09 14:41:06 -04:00
<copy todir="${dir.build}">
<fileset dir="${dir.source}">
<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>
<target name="clean">
<delete dir="${dir.dist}" />
2008-06-09 14:41:06 -04:00
<delete dir="${dir.build}" />
</target>
2008-06-09 14:41:06 -04:00
2008-06-09 14:41:06 -04:00
<target name="test" depends="clean, build-test, fatjar">
<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>
<target name="run" depends="fatjar">
2008-06-09 14:41:06 -04:00
<java jar="${executable}" fork="yes" />
</target>
</project>