You can set the failureproperty attribute of the junit
task, then test the property afterwards with the fail task:
<junit haltonfailure="no" failureproperty="test.failed" ... >
...
</junit>
<fail message="Test failure detected, check test results." if="test.failed" />