<?xml version="1.0"?>

<!-- Smack Build Script ========================================== -->
<!-- Jive Software      ============================================== -->

<!--
    $RCSfile$
    $Revision: 7435 $
    $Date: 2007-03-09 11:44:36 -0800 (Fri, 09 Mar 2007) $
-->

<project name="Smack" default="jar" basedir="..">

   <property name="compile.dir" value="${basedir}/target/classes" />
   <property name="merge.lib.dir" value="${basedir}/build/lib" />

   <!-- compile -->
   <!-- ======================================================================================= -->
   <target name="compile" description="Compiles all source to ${compile.dir}.">
       <!-- make target dir -->
       <mkdir dir="${compile.dir}" />
       <javac
           destdir="${compile.dir}"
           includeAntRuntime="no"
           debug="on"
           source="1.5"
           target="1.5"
       >
           <src path="${basedir}/src" />
           <classpath>
               <fileset dir="${merge.lib.dir}">
                   <include name="*.jar"/>
               </fileset>
           </classpath>
       </javac>
   </target>
    

   <!-- jar -->
   <!-- ======================================================================================= -->
   <target name="jar" depends="compile" unless="jar.uptodate" description="Produces throttletest.jar">
       <jar destfile="${basedir}/target/throttlereader.jar"
           basedir="${compile.dir}"
           includes="org/jivesoftware/openfire/test/throttle/ThrottleTestReader.class"
        >
            <zipfileset src="${merge.lib.dir}/smack.jar"/>
            <zipfileset src="${merge.lib.dir}/smackx.jar"/>
            <manifest>
                <attribute name="Main-Class" value="org.jivesoftware.openfire.test.throttle.ThrottleTestReader" />
            </manifest>
       </jar>
        <jar destfile="${basedir}/target/throttlewriter.jar"
           basedir="${compile.dir}"
           includes="org/jivesoftware/openfire/test/throttle/ThrottleTestWriter.class"
        >
            <zipfileset src="${merge.lib.dir}/smack.jar"/>
            <zipfileset src="${merge.lib.dir}/smackx.jar"/>
            <manifest>
                <attribute name="Main-Class" value="org.jivesoftware.openfire.test.throttle.ThrottleTestWriter" />
            </manifest>
       </jar>
   </target>

    <!-- clean -->
    <!-- ======================================================================================= -->
    <target name="clean" description="Deletes all generated content.">
        <delete dir="${basedir}/target" />
    </target>

</project>