<project name="rjunit-tests" basedir="." default="server-and-client">

    <taskdef name="rjunit" classname="org.apache.tools.ant.taskdefs.optional.rjunit.RJUnitTask"/>

    <target name="server-and-client">
        <echo message="java.class.path: ${java.class.path}"/>
        <rjunit>
            <server port="1234">
                <formatter type="plain">
                    <param name="file" location="junit-test-log.txt"/>
                </formatter>
            </server>
            <client host="127.0.0.1"  port="1234">
                <classpath path="${java.class.path}"/>
                <test name="org.apache.tools.ant.taskdefs.optional.junit.data.Test1"/>
            </client>
        </rjunit>
    </target>

    <target name="server-only">
        <rjunit>
            <server port="1234">
                <formatter type="plain">
                    <param name="file" location="junit-test-log.txt"/>
                </formatter>
                <formatter type="xml">
                    <param name="file" location="junit-test-log.xml"/>
                </formatter>
            </server>
        </rjunit>
    </target>

    <target name="client-only">
        <rjunit>
            <client host="127.0.0.1"  port="1234">
                <classpath path="${java.class.path}"/>
                <test name="org.apache.tools.ant.taskdefs.optional.junit.data.Test1"/>
            </client>
        </rjunit>
    </target>

</project>