<project
    xmlns:maven="jelly:maven"
    xmlns:ant="jelly:ant"
    xmlns:j="jelly:core"
    xmlns:u="jelly:util">

    <postGoal name="clean">
        <ant:delete quiet="true" failonerror="false">
            <fileset dir="${basedir}">
                <include name="*.log"/>
            </fileset>
        </ant:delete>
    </postGoal>

    <!-- Goal to run the test. -->
    <goal name="run">
        <copy todir="${basedir}/target/classes">
            <fileset dir="${basedir}">
                <include name="jpox.properties"/>
                <include name="log4j.properties"/>
            </fileset>
        </copy>

        <path id="myclasspath">
            <path refid="maven.dependency.classpath"/>
            <pathelement path="${maven.build.dest}"/>
        </path>

        <ant:java dir="${basedir}" classname="test.Main" failonerror="true" fork="false">
            <classpath refid="myclasspath"/>
            <jvmarg value="-Dlog4j.configuration=file:${basedir}/log4j.properties"/>
        </ant:java>
    </goal>
</project>
