Color (red/green) console output for ant junit tests

ant, java, junit

Solution

The AnsiColorLogger described in the Ant manual should do exactly what you want.

Problem

I'm playing with `ant` and `JUnit4` in a terminal emulator, not in an IDE like Eclipse. Is there an ant-native method of getting colorised test results? A google search led me to this python script; I'd prefer to utilize 'pure' `ant` if I can. For example, when I run my tests with `ant runtests`, I'd like to display the `FAILED` tests red, the `PASSED` tests green, etc.

Original source

Related problems