2007-12-23 14:28:04 -05:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<project name="FileBot" basedir="." default="fatjar">
|
|
|
|
|
|
|
|
<property name="title" value="${ant.project.name}" />
|
2007-12-23 15:18:59 -05:00
|
|
|
<property name="version" value="1.6" />
|
2007-12-23 14:28:04 -05:00
|
|
|
|
|
|
|
<property name="source" location="${basedir}/source" />
|
|
|
|
<property name="build" location="${basedir}/build" />
|
|
|
|
<property name="lib" location="${basedir}/lib" />
|
|
|
|
|
2007-12-23 15:18:59 -05:00
|
|
|
<property name="executable" location="${build}/${title}.jar" />
|
2007-12-23 14:28:04 -05:00
|
|
|
|
|
|
|
<property name="lib.xerces" value="xercesImpl.jar" />
|
2008-02-13 15:08:06 -05:00
|
|
|
<property name="lib.nekohtml" value="nekohtml-1.9.6.1.jar" />
|
|
|
|
<property name="lib.simmetrics" value="simmetrics_jar_v1_6_2_d07_02_07.jar" />
|
|
|
|
<property name="lib.xmlrpc" value="xmlrpc-client-1.1.jar" />
|
|
|
|
|
2007-12-23 14:28:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
<target name="jar" depends="build">
|
|
|
|
<jar destfile="${executable}" duplicate="fail">
|
|
|
|
<fileset dir="${build}" />
|
|
|
|
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Built-By" value="${user.name}" />
|
|
|
|
<attribute name="Main-Class" value="Main" />
|
|
|
|
<attribute name="Version" value="${version}" />
|
|
|
|
</manifest>
|
|
|
|
|
|
|
|
<!-- include libs if fatjar is set -->
|
2008-02-13 15:08:06 -05:00
|
|
|
<zipfileset src="${lib}/${lib.xerces}">
|
2007-12-23 14:28:04 -05:00
|
|
|
<include if="fatjar" name="**/*.class" />
|
|
|
|
<include if="fatjar" name="**/*.properties" />
|
2008-02-13 15:08:06 -05:00
|
|
|
<exclude if="fatjar" name="**/*Test*" />
|
2007-12-23 14:28:04 -05:00
|
|
|
</zipfileset>
|
2008-02-13 15:08:06 -05:00
|
|
|
<zipfileset src="${lib}/${lib.nekohtml}">
|
2007-12-23 14:28:04 -05:00
|
|
|
<include if="fatjar" name="**/*.class" />
|
2008-02-13 15:08:06 -05:00
|
|
|
<include if="fatjar" name="**/*.properties" />
|
|
|
|
<exclude if="fatjar" name="**/*Test*" />
|
|
|
|
</zipfileset>
|
2007-12-23 14:28:04 -05:00
|
|
|
<zipfileset src="${lib}/${lib.simmetrics}">
|
|
|
|
<include if="fatjar" name="**/*.class" />
|
2008-02-13 15:08:06 -05:00
|
|
|
<include if="fatjar" name="**/*.properties" />
|
2008-02-03 13:06:12 -05:00
|
|
|
<exclude if="fatjar" name="**/*Test*" />
|
2008-02-13 15:08:06 -05:00
|
|
|
</zipfileset>
|
|
|
|
<zipfileset src="${lib}/${lib.xmlrpc}">
|
|
|
|
<include if="fatjar" name="**/*.class" />
|
|
|
|
<include if="fatjar" name="**/*.properties" />
|
|
|
|
<exclude if="fatjar" name="**/*Test*" />
|
|
|
|
</zipfileset>
|
2007-12-23 14:28:04 -05:00
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<target name="fatjar">
|
|
|
|
<antcall target="jar">
|
|
|
|
<param name="fatjar" value="true" />
|
|
|
|
</antcall>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<target name="build" depends="clean">
|
|
|
|
<!-- create build dir -->
|
|
|
|
<mkdir dir="${build}" />
|
|
|
|
|
|
|
|
<!-- compile -->
|
|
|
|
<javac srcdir="${source}" destdir="${build}">
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${lib}" includes="*.jar" />
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<!-- copy resources -->
|
|
|
|
<copy todir="${build}">
|
|
|
|
<fileset dir="${source}">
|
|
|
|
<include name="**/*.png" />
|
|
|
|
<include name="**/*.gif" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete dir="${build}" />
|
|
|
|
<delete file="${executable}" verbose="true" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<target name="run" depends="fatjar">
|
|
|
|
<java jar="${executable}" fork="true" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|