2008-03-02 17:02:37 +00:00
|
|
|
<?xml version="1.0"?>
|
2008-12-31 20:11:27 +00:00
|
|
|
<project name="FileBot" default="jar">
|
2007-12-23 19:28:04 +00:00
|
|
|
|
|
|
|
<property name="title" value="${ant.project.name}" />
|
2008-12-31 20:11:27 +00:00
|
|
|
<property name="version" value="1.9" />
|
2007-12-23 19:28:04 +00:00
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<tstamp>
|
|
|
|
<format property="today" pattern="yyyy-MM-dd" />
|
|
|
|
</tstamp>
|
2007-12-23 19:28:04 +00:00
|
|
|
|
2008-12-31 20:11:27 +00: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" />
|
|
|
|
<property name="dir.lib" location="${basedir}/lib" />
|
2008-02-13 20:08:06 +00:00
|
|
|
|
2007-12-23 19:28:04 +00:00
|
|
|
|
2008-06-09 18:41:06 +00:00
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<target name="jar" depends="build">
|
2008-07-30 22:37:01 +00:00
|
|
|
<!-- create dist dir -->
|
|
|
|
<mkdir dir="${dir.dist}" />
|
2008-12-31 20:11:27 +00:00
|
|
|
|
|
|
|
<!-- main jar -->
|
|
|
|
<jar destfile="${dir.dist}/filebot.jar">
|
|
|
|
<fileset dir="${dir.build}" excludes="**/*Test*" />
|
2007-12-23 19:28:04 +00:00
|
|
|
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Built-By" value="${user.name}" />
|
2008-12-31 20:11:27 +00:00
|
|
|
<attribute name="Built-Date" value="${today}" />
|
|
|
|
<attribute name="Implementation-Title" value="${title}" />
|
|
|
|
<attribute name="Implementation-Version" value="${version}" />
|
2009-02-15 21:11:03 +00:00
|
|
|
<attribute name="Class-Path" value="args4j.jar miglayout.jar glazedlists.jar nekohtml.jar xercesImpl.jar ehcache.jar simmetrics.jar xmlrpc-client.jar" />
|
2008-12-31 20:11:27 +00:00
|
|
|
<attribute name="Main-Class" value="net.sourceforge.filebot.Main" />
|
2007-12-23 19:28:04 +00:00
|
|
|
</manifest>
|
2008-12-31 20:11:27 +00:00
|
|
|
</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>
|
2007-12-23 19:28:04 +00:00
|
|
|
|
2008-06-09 18:41:06 +00:00
|
|
|
<!-- include libs -->
|
2008-12-31 20:11:27 +00:00
|
|
|
<zipfileset src="${dir.lib}/xercesImpl.jar">
|
2009-02-15 21:11:03 +00:00
|
|
|
<include name="**/*.class" />
|
|
|
|
<include name="**/*.properties" />
|
2007-12-23 19:28:04 +00:00
|
|
|
</zipfileset>
|
2008-06-02 19:12:28 +00:00
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<zipfileset src="${dir.lib}/nekohtml.jar">
|
2008-06-09 18:41:06 +00:00
|
|
|
<include name="**/*.class" />
|
|
|
|
<include name="**/*.properties" />
|
2008-02-13 20:08:06 +00:00
|
|
|
</zipfileset>
|
2008-06-09 18:41:06 +00:00
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<zipfileset src="${dir.lib}/simmetrics.jar">
|
2009-02-15 21:11:03 +00:00
|
|
|
<include name="**/*.class" />
|
2008-06-09 18:41:06 +00:00
|
|
|
</zipfileset>
|
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<zipfileset src="${dir.lib}/glazedlists.jar">
|
2009-02-15 21:11:03 +00:00
|
|
|
<include name="**/*.class" />
|
2008-10-12 20:25:23 +00:00
|
|
|
</zipfileset>
|
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<zipfileset src="${dir.lib}/miglayout.jar">
|
2008-06-09 18:41:06 +00:00
|
|
|
<include name="**/*.class" />
|
2008-10-18 08:58:54 +00:00
|
|
|
<include name="**/*.properties" />
|
2008-02-13 20:08:06 +00:00
|
|
|
</zipfileset>
|
2008-06-02 19:12:28 +00:00
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<zipfileset src="${dir.lib}/xmlrpc-client.jar">
|
2008-10-12 20:25:23 +00:00
|
|
|
<include name="**/*.class" />
|
2008-10-18 08:58:54 +00:00
|
|
|
<include name="**/*.properties" />
|
2008-02-13 20:08:06 +00:00
|
|
|
</zipfileset>
|
2008-10-12 20:25:23 +00:00
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<zipfileset src="${dir.lib}/args4j.jar">
|
2008-10-12 20:25:23 +00:00
|
|
|
<include name="**/*.class" />
|
2008-10-18 08:58:54 +00:00
|
|
|
<include name="**/*.properties" />
|
2008-07-30 22:37:01 +00:00
|
|
|
</zipfileset>
|
2009-02-02 20:50:04 +00:00
|
|
|
|
|
|
|
<zipfileset src="${dir.lib}/ehcache.jar">
|
2009-02-15 21:11:03 +00:00
|
|
|
<include name="**/*.class" />
|
2009-02-02 20:50:04 +00:00
|
|
|
</zipfileset>
|
2007-12-23 19:28:04 +00:00
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2008-06-09 18:41:06 +00:00
|
|
|
<target name="build">
|
2007-12-23 19:28:04 +00:00
|
|
|
<!-- create build dir -->
|
2008-06-09 18:41:06 +00:00
|
|
|
<mkdir dir="${dir.build}" />
|
2007-12-23 19:28:04 +00:00
|
|
|
|
|
|
|
<!-- compile -->
|
2008-12-31 20:11:27 +00:00
|
|
|
<javac srcdir="${dir.source}:${dir.test}" destdir="${dir.build}" source="1.6" encoding="utf-8">
|
2007-12-23 19:28:04 +00:00
|
|
|
<classpath>
|
2008-06-09 18:41:06 +00:00
|
|
|
<fileset dir="${dir.lib}" includes="*.jar" />
|
2007-12-23 19:28:04 +00:00
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<!-- copy resources -->
|
2008-06-09 18:41:06 +00:00
|
|
|
<copy todir="${dir.build}">
|
|
|
|
<fileset dir="${dir.source}">
|
2007-12-23 19:28:04 +00:00
|
|
|
<include name="**/*.png" />
|
2009-01-04 18:28:28 +00:00
|
|
|
<include name="**/*.xml" />
|
2007-12-23 19:28:04 +00:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<target name="clean">
|
2008-07-30 22:37:01 +00:00
|
|
|
<delete dir="${dir.dist}" />
|
2008-06-09 18:41:06 +00:00
|
|
|
<delete dir="${dir.build}" />
|
2007-12-23 19:28:04 +00:00
|
|
|
</target>
|
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
|
|
|
|
<target name="test" depends="jar">
|
|
|
|
<junit printsummary="yes" fork="true">
|
2008-06-09 18:41:06 +00:00
|
|
|
<classpath>
|
2008-12-31 20:11:27 +00:00
|
|
|
<fileset dir="${dir.dist}" includes="*.jar" />
|
|
|
|
<fileset dir="${dir.lib}" includes="*.jar" />
|
2008-06-09 18:41:06 +00:00
|
|
|
</classpath>
|
2008-12-31 20:11:27 +00:00
|
|
|
|
2008-06-09 18:41:06 +00:00
|
|
|
<formatter type="plain" />
|
2008-12-31 20:11:27 +00:00
|
|
|
|
|
|
|
<test name="net.sourceforge.filebot.AllTests" outfile="test-report" />
|
2008-06-09 18:41:06 +00:00
|
|
|
</junit>
|
|
|
|
</target>
|
2008-12-31 20:11:27 +00:00
|
|
|
|
2008-06-09 18:41:06 +00:00
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<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" />
|
2008-03-02 17:02:37 +00:00
|
|
|
|
2008-12-31 20:11:27 +00:00
|
|
|
<test name="net.sourceforge.filebot.AllTests" outfile="test-report" />
|
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
|
2009-02-15 21:11:03 +00:00
|
|
|
<target name="run-fatjar" depends="fatjar">
|
|
|
|
<java jar="${dir.dist}/fatjar/FileBot.jar" fork="true" />
|
|
|
|
</target>
|
|
|
|
|
2008-03-02 17:02:37 +00:00
|
|
|
</project>
|