Skip to content
Advertisement

Maven shows no colors in macOS terminal

I installed Maven (the latest version, 3.8.3) via Homebrew (brew install maven) on a Mac running the latest macOS Monterey (12.0.1, Apple Silicon).

When I run any mvn command in the terminal, the output is plain white with no colors and no bold text. I tried the same command (also version 3.8.3) on my older MacBook (Monterey 12.0.1 as well), with the exact same Terminal settings and here, the colors are there just as expected.

When explicitly setting -Dstyle.color=always after mvn, the colors also work as expected, but I don’t want to set this all the time.

Other things I’ve tried:

  • setting the environment variable MAVEN_OPTS to -Dstyle.color=always – no success
  • running IntelliJ’s bundled mvn (version 3.6.3) – colors work as expected

Are there any settings that I might have missed? Or is there another way to explicitly tell Maven to always set style.color=always?

Advertisement

Answer

The reason is simple: this is only included in Jansi 2.4.0 which is not in a Maven release yet. If you ask politely, I can include this in Maven 3.8.4.

I have addressed this here: https://issues.apache.org/jira/browse/MNG-7331

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement