Como posso fazer com que a tarefa Ant JUnit execute todos os testes e, em seguida, pare o restante da compilação se algum teste falhou

Estou executando o JUnit via Ant usando um destino mais ou menos assim:

<target name="junit" depends="compile">
    <mkdir dir="${report.dir}"/>
    <junit printsummary="yes" haltonfailure="yes" showoutput="yes" >
        <classpath>
            <path refid="classpath"/>
            <path location="${classes.dir}"/>
        </classpath>
        <formatter type="brief" usefile="false"/>
        <formatter type="xml"/>

        <batchtest fork="yes" todir="${report.dir}">
            <fileset dir="${src.dir}" includes="**/*Tests.java" />
        </batchtest>
    </junit>
</target>

Eu tenho uma classe como esta:

public class UserTests extends TestCase {

    public void testWillAlwaysFail() {
        fail("An error message");
    }
    public void testWillAlwaysFail2() {
        fail("An error message2");
    }
}

haltonfailure="yes" parece causar a interrupção da construção assim que um teste único falhar, registrando apenas o primeiro teste com falha. A configuração para "off" faz com que toda a compilação seja bem-sucedida (mesmo que as mensagens de falha de teste sejam gravadas na saída).

O que eu quero que todos os testes sejam executados (mesmo se um falhar) e, em seguida, a compilação seja interrompida se algum teste falhar.

É possível fazer isso?

questionAnswers(1)

yourAnswerToTheQuestion