Running with maven/surefire

356 views
Skip to first unread message

Bob Walker

unread,
Oct 6, 2012, 2:43:55 AM10/6/12
to jans...@googlegroups.com
Hi - great library, thanks!
Is there a simple answer to why JAnsi doesn't colour output when called from a maven install / junit test? 
given the attached project, 
mvn clean install 
will print the output, but un-coloured, whilst 
mvn clean install exec:java -Dexec.mainClass=test.JAnsiTest
applies the expected colouring.
Any insight gratefully appreciated.
Regards,
Bob

jansi-test.zip

Hiram Chirino

unread,
Oct 6, 2012, 11:02:21 AM10/6/12
to jans...@googlegroups.com
It depends if the the System.out is directed at a console or a file (or process pipe).  JANSI strips ANSI color codes if the output is not a console that can display them.
--

Hiram Chirino

Engineering | Red Hat, Inc.

hchi...@redhat.com | fusesource.com | redhat.com

skype: hiramchirino | twitter: @hiramchirino

blog: Hiram Chirino's Bit Mojo


Reply all
Reply to author
Forward
0 new messages