How do I remove colors from Maven output?
--batch-mode
, mentioned in other answers, is usually a better option for non-interactive execution, like in a CI server, but if you want just to turn off the color, it is possible since maven 3.5.1 using the following option:
mvn -Dstyle.color=never
other options for this parameter are always
or auto
.
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] ------------------------------------------------------------------------