<?xml version="1.0" encoding="UTF-8"?>
<project name="Example TeamForge programs" default="example1" basedir=".">
    <property name="teamforge.url" value="http://localhost/"/>
    <property name="teamforge.username" value="admin"/>
    <property name="teamforge.password" value="admin"/>
    <property name="teamforge.userFindMe" value="admin"/>
    <property name="teamforge.tracker" value="tracker1001"/>
    <property name="teamforge.project" value="proj1008"/>
    <property name="teamforge.doc.location" value="some/path/to/readme.txt"/>
    <property name="teamforge.doc.file" value="${basedir}/readme.txt"/>
    <path id="classpath">
        <fileset dir="../lib">
            <include name="*.jar"/>
        </fileset>
        <pathelement path="target/examples.jar"/>
    </path>
    <target name="clean">
        <delete dir="target"/>
    </target>
    <target name="build">
        <mkdir dir="target/classes"/>
        <javac srcdir="src" destdir="target/classes">
            <classpath refid="classpath"/>
        </javac>
        <jar destfile="target/examples.jar">
            <fileset dir="target/classes"/>
            <fileset dir="src/main/resources"/>
        </jar>
    </target>
    <target name="example1" description="runs the example1 program" depends="build">
        <java classname="com.collab.examples.Example1" fork="true">
            <arg value="${teamforge.url}"/>
            <arg value="${teamforge.username}"/>
            <arg value="${teamforge.password}"/>
            <classpath refid="classpath"/>
        </java>
    </target>
    <target name="example2" description="runs the example2 program" depends="build">
        <java classname="com.collab.examples.Example2" fork="true">
            <arg value="${teamforge.url}"/>
            <arg value="${teamforge.username}"/>
            <arg value="${teamforge.password}"/>
            <arg value="${teamforge.userFindMe}"/>
            <classpath refid="classpath"/>
        </java>
    </target>
    <target name="example3" description="runs the example3 program" depends="build">
        <java classname="com.collab.examples.Example3" fork="true">
            <arg value="${teamforge.url}"/>
            <arg value="${teamforge.username}"/>
            <arg value="${teamforge.password}"/>
            <arg value="${teamforge.tracker}"/>
            <classpath refid="classpath"/>
        </java>
    </target>
    <target name="example4" description="runs the example4 program" depends="build">
        <java classname="com.collab.examples.Example4" fork="true">
            <arg value="${teamforge.url}"/>
            <arg value="${teamforge.username}"/>
            <arg value="${teamforge.password}"/>
            <arg value="${teamforge.project}"/>
            <arg value="${teamforge.doc.location}"/>
            <arg value="${teamforge.doc.file}"/>
            <classpath refid="classpath"/>
        </java>
    </target>
    <target name="example5" description="runs the example5 program" depends="build">
        <java classname="com.collab.examples.Example5" fork="true">
            <arg value="${teamforge.url}"/>
            <arg value="${teamforge.username}"/>
            <arg value="${teamforge.password}"/>
            <arg value="${teamforge.doc.project}"/>
            <classpath refid="classpath"/>
        </java>
    </target>
    <target name="example6" description="runs the example6 program" depends="build">
        <java classname="com.collab.examples.Example6" fork="true">
            <arg value="${teamforge.url}"/>
            <arg value="${teamforge.username}"/>
            <arg value="${teamforge.password}"/>
            <arg value="${teamforge.project}"/>
            <classpath refid="classpath"/>
        </java>
    </target>
    <target name="example7" description="runs the example7 program" depends="build">
        <java classname="com.collab.examples.Example7" fork="true">
            <arg value="${teamforge.url}"/>
            <arg value="${teamforge.username}"/>
            <arg value="${teamforge.password}"/>
            <arg value="${teamforge.project}"/>
            <classpath refid="classpath"/>
        </java>
    </target>
</project>
