1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-16 06:15:02 -05:00
filebot/build.xml

164 lines
4.5 KiB
XML
Raw Normal View History

2009-05-21 06:00:48 -04:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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*" />
</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">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Built-Date" value="${today}" />
<attribute name="Application-Name" value="${title}" />
<attribute name="Application-Version" value="${version}" />
<attribute name="Main-Class" value="net.sourceforge.filebot.Main" />
</manifest>
<!-- include build -->
<fileset dir="${dir.build}" excludes="**/*Test*" />
2008-06-09 14:41:06 -04:00
<!-- include libs -->
<zipfileset src="${dir.lib}/xercesImpl.jar">
<include name="org/apache/**" />
<include name="org/w3c/dom/html/**" />
</zipfileset>
<zipfileset src="${dir.lib}/nekohtml.jar">
<include name="org/cyberneko/html/**" />
</zipfileset>
<zipfileset src="${dir.lib}/simmetrics.jar">
<include name="uk/ac/shef/wit/simmetrics/**" />
2008-06-09 14:41:06 -04:00
</zipfileset>
<zipfileset src="${dir.lib}/glazedlists.jar">
<include name="ca/odell/glazedlists/**" />
</zipfileset>
<zipfileset src="${dir.lib}/miglayout.jar">
<include name="net/miginfocom/**" />
</zipfileset>
<zipfileset src="${dir.lib}/xmlrpc-client.jar">
<include name="redstone/xmlrpc/**" />
</zipfileset>
<zipfileset src="${dir.lib}/args4j.jar">
<include name="org/kohsuke/args4j/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ehcache.jar">
<include name="net/sf/ehcache/**" />
</zipfileset>
<zipfileset src="${dir.lib}/jna.jar">
<!-- include classes and native libraries -->
<include name="com/sun/jna/**" />
</zipfileset>
<zipfileset src="${dir.lib}/js-engine.jar">
<include name="com/sun/phobos/script/**" />
</zipfileset>
<zipfileset src="${dir.lib}/js.jar">
<include name="org/mozilla/**" />
</zipfileset>
<zipfileset src="${dir.lib}/sublight-ws.jar">
<include name="net/sublight/webservice/**" />
</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 -->
<javac srcdir="${dir.source}:${dir.test}" destdir="${dir.build}" source="1.6" encoding="utf-8">
<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}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${dir.dist}" />
2008-06-09 14:41:06 -04:00
<delete dir="${dir.build}" />
</target>
<target name="test" depends="jar">
<junit printsummary="yes" fork="true">
2008-06-09 14:41:06 -04:00
<classpath>
<fileset dir="${dir.dist}" includes="*.jar" />
<fileset dir="${dir.lib}" includes="*.jar" />
2008-06-09 14:41:06 -04:00
</classpath>
2008-06-09 14:41:06 -04:00
<formatter type="plain" />
<test name="net.sourceforge.filebot.AllTests" outfile="test-report" />
2008-06-09 14:41:06 -04:00
</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>
2009-02-15 16:11:03 -05:00
<target name="run-fatjar" depends="fatjar">
<java jar="${dir.dist}/fatjar/FileBot.jar" fork="true" />
</target>
</project>