mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-16 06:15:02 -05:00
f7fdc5b5db
* slightly modified season episode regex * added ehcache to fatjar build
159 lines
4.7 KiB
XML
159 lines
4.7 KiB
XML
<?xml version="1.0"?>
|
|
<project name="FileBot" default="jar">
|
|
|
|
<property name="title" value="${ant.project.name}" />
|
|
<property name="version" value="1.9" />
|
|
|
|
<tstamp>
|
|
<format property="today" pattern="yyyy-MM-dd" />
|
|
</tstamp>
|
|
|
|
<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" />
|
|
<property name="dir.lib" location="${basedir}/lib" />
|
|
|
|
|
|
|
|
<target name="jar" depends="build">
|
|
<!-- create dist dir -->
|
|
<mkdir dir="${dir.dist}" />
|
|
|
|
<!-- main jar -->
|
|
<jar destfile="${dir.dist}/filebot.jar">
|
|
<fileset dir="${dir.build}" excludes="**/*Test*" />
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="${user.name}" />
|
|
<attribute name="Built-Date" value="${today}" />
|
|
<attribute name="Implementation-Title" value="${title}" />
|
|
<attribute name="Implementation-Version" value="${version}" />
|
|
<attribute name="Class-Path" value="args4j.jar miglayout.jar glazedlists.jar nekohtml.jar xercesImpl.jar simmetrics.jar xmlrpc-client.jar" />
|
|
<attribute name="Main-Class" value="net.sourceforge.filebot.Main" />
|
|
</manifest>
|
|
</jar>
|
|
|
|
<!-- extra jar containing all the unit tests -->
|
|
<jar destfile="${dir.dist}/filebot-test.jar">
|
|
<fileset dir="${dir.build}" includes="**/*Test*" />
|
|
</jar>
|
|
</target>
|
|
|
|
|
|
<target name="fatjar" depends="jar">
|
|
<!-- create dist/fatjar dir -->
|
|
<mkdir dir="${dir.dist}/fatjar" />
|
|
|
|
<jar destfile="${dir.dist}/fatjar/FileBot.jar" filesetmanifest="merge" duplicate="fail">
|
|
|
|
<zipfileset src="${dir.dist}/filebot.jar">
|
|
<include name="**/*" />
|
|
</zipfileset>
|
|
|
|
<!-- include libs -->
|
|
<zipfileset src="${dir.lib}/xercesImpl.jar">
|
|
<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>
|
|
|
|
<zipfileset src="${dir.lib}/nekohtml.jar">
|
|
<include name="**/*.class" />
|
|
<include name="**/*.properties" />
|
|
</zipfileset>
|
|
|
|
<zipfileset src="${dir.lib}/simmetrics.jar">
|
|
<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="${dir.lib}/glazedlists.jar">
|
|
<include name="ca/odell/glazedlists/**" />
|
|
</zipfileset>
|
|
|
|
<zipfileset src="${dir.lib}/miglayout.jar">
|
|
<include name="**/*.class" />
|
|
<include name="**/*.properties" />
|
|
</zipfileset>
|
|
|
|
<zipfileset src="${dir.lib}/xmlrpc-client.jar">
|
|
<include name="**/*.class" />
|
|
<include name="**/*.properties" />
|
|
</zipfileset>
|
|
|
|
<zipfileset src="${dir.lib}/args4j.jar">
|
|
<include name="**/*.class" />
|
|
<include name="**/*.properties" />
|
|
</zipfileset>
|
|
|
|
<zipfileset src="${dir.lib}/ehcache.jar">
|
|
<include name="net/sf/ehcache/**" />
|
|
</zipfileset>
|
|
</jar>
|
|
</target>
|
|
|
|
|
|
<target name="build">
|
|
<!-- create build dir -->
|
|
<mkdir dir="${dir.build}" />
|
|
|
|
<!-- compile -->
|
|
<javac srcdir="${dir.source}:${dir.test}" destdir="${dir.build}" source="1.6" encoding="utf-8">
|
|
<classpath>
|
|
<fileset dir="${dir.lib}" includes="*.jar" />
|
|
</classpath>
|
|
</javac>
|
|
|
|
<!-- copy resources -->
|
|
<copy todir="${dir.build}">
|
|
<fileset dir="${dir.source}">
|
|
<include name="**/*.png" />
|
|
<include name="**/*.xml" />
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
|
|
<target name="clean">
|
|
<delete dir="${dir.dist}" />
|
|
<delete dir="${dir.build}" />
|
|
</target>
|
|
|
|
|
|
<target name="test" depends="jar">
|
|
<junit printsummary="yes" fork="true">
|
|
<classpath>
|
|
<fileset dir="${dir.dist}" includes="*.jar" />
|
|
<fileset dir="${dir.lib}" includes="*.jar" />
|
|
</classpath>
|
|
|
|
<formatter type="plain" />
|
|
|
|
<test name="net.sourceforge.filebot.AllTests" outfile="test-report" />
|
|
</junit>
|
|
</target>
|
|
|
|
|
|
<target name="test-fatjar" depends="fatjar">
|
|
<junit printsummary="yes" fork="true">
|
|
<classpath>
|
|
<pathelement location="${dir.dist}/fatjar/FileBot.jar" />
|
|
<pathelement location="${dir.dist}/filebot-test.jar" />
|
|
<pathelement location="${dir.lib}/junit.jar" />
|
|
</classpath>
|
|
|
|
<formatter type="plain" />
|
|
|
|
<test name="net.sourceforge.filebot.AllTests" outfile="test-report" />
|
|
</junit>
|
|
</target>
|
|
|
|
</project>
|