File:  [mozdev] / bayesjunktool / build.xml
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Sat Apr 9 20:04:24 2005 UTC (13 years, 5 months ago) by brantgurga
Branches: MAIN
CVS tags: HEAD
Add a test target.

<?xml version="1.0" encoding="UTF-8"?>
<project name="bayesjunktool" default="build" basedir=".">
    <description>Build bayesjunktool.</description>
    <target name="init">
        <property name="src.dir" value="src"/>
        <property name="build.dir" value="build"/>
        <property name="javadoc.dir" value="doc"/>
        <property name="test.dir" value="test"/>
        <property name="jar.name" value="bayesjunktool-0.2.1"/>
    </target>
    <target name="build" description="Compiles bayesjunktool." depends="init">
        <mkdir dir="${build.dir}"/>
        <copy todir="${build.dir}">
            <fileset dir="${src.dir}">
                <include name="**/*.gif"/>
            </fileset>
        </copy>
        <javac srcdir="${src.dir}" destdir="${build.dir}" deprecation="on"/>
    </target>
    
    <target name="test" description="Tests bayesjunktool." depends="init, build">
        <javac srcdir="${test.dir}" destdir="${build.dir}" deprecation="on"/>
    </target>

    <target name="makeJar" description="Builds a JAR file" depends="build">
        <jar destfile="${jar.name}.jar">
            <fileset dir="${build.dir}">
                <include name="**/*.*"/>
            </fileset>
            <manifest>
                <attribute name="Main-Class" value="mozilla_training_analyzer.Analyzer"/>
            </manifest>
        </jar>
    </target>

    <target name="run" description="Runs bayesjunktool after compiling." depends="build">
        <java classname="mozilla_training_analyzer.Analyzer" classpath="${build.dir}" fork="true"/>
    </target>

    <target name="clean" depends="init" description="Cleans up generated files.">
        <delete file="${jar.name}.jar"/>
        <delete dir="${build.dir}"/>
        <delete dir="${javadoc.dir}"/>
    </target>

    <target name="javadoc" description="Generate JavaDoc API information" depends="init">
        <mkdir dir="${javadoc.dir}"/>
        <javadoc destdir="${javadoc.dir}">
            <fileset dir="${src.dir}">
                <include name="**/*.java"/>
            </fileset>
        </javadoc>
    </target>
</project>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>