It turns out that this is possible.
Maven uses several styles to format its output:
enum Style { DEBUG( "bold,cyan" ), INFO( "bold,blue" ), WARNING( "bold,yellow" ), ERROR( "bold,red" ), SUCCESS( "bold,green" ), FAILURE( "bold,red" ), STRONG( "bold" ), MOJO( "green" ), PROJECT( "cyan" ); ... }
You can override the default color of the style with the system property style.style_name . For example, to change the default INFO style from blue to dark gray, you go through
-Dstyle.info=bold,black
for maven. It can also be specified with the environment variable MAVEN_OPTS , so as not to type it with every maven call.
If you donβt know which style is used in a specific part of the output, you can map it by default.
The colors that can be used in the style are determined by jansi :
public enum Color { BLACK(0, "BLACK"), RED(1, "RED"), GREEN(2, "GREEN"), YELLOW(3, "YELLOW"), BLUE(4, "BLUE"), MAGENTA(5, "MAGENTA"), CYAN(6, "CYAN"), WHITE(7, "WHITE"), DEFAULT(9, "DEFAULT"); }
It seems that you can prefix the color with bg to indicate the background color, and to add it intensively you add the bold modifier, for example: bold,white,bgcyan - intense white color on a blue background.