Home > Software design >  Maven: No colors in macOS terminal
Maven: No colors in macOS terminal

Time:11-12

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?

CodePudding user response:

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

  • Related