Issue
When I run a maven goal in Jenkins (e.g. "mvn test"), the logs are very hard to read because of the color control characters that appear (see example below). Is there anyway to remove the color formatting?
[[1;34mINFO[m] [1m-------------------------------------------------------------------[m
[[1;34mINFO[m] [1;32mBUILD SUCCESS[m
[[1;34mINFO[m] [1m-------------------------------------------------------------------[m
[[1;34mINFO[m] Total time: 16.097 s
[[1;34mINFO[m] Finished at: 2017-04-26T11:23:06-04:00
[[1;34mINFO[m] Final Memory: 41M/100M
[[1;34mINFO[m] [1m-------------------------------------------------------------------[m
Solution
Thanks to khmarbaise for his/her answer in the comment to my question:
you can simply define -B for --batch-mode which will turn off using of colors..
This fixed the issue, my output now looks like this (much nicer):
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.507 s
[INFO] Finished at: 2017-04-27T05:30:07-04:00
[INFO] Final Memory: 41M/100M
[INFO] ------------------------------------------------------------------------
Answered By - simbro
Answer Checked By - Robin (JavaFixing Admin)