Package org.apache.maven.shared.utils.logging

package org.apache.maven.shared.utils.logging
An API to write Maven messages to console with styled color content, consistently across whole Maven ecosystem (Maven itself or any plugin or extension).

Messages are built with instances of MessageBuilder which provides a fluent API, while error level are colored by slf4j provider with LoggerLevelRenderer.

MessageUtils gives access to these builders.

Plugins can use this API with any Maven version: color just won't be activated when run with Maven versions older than 3.5.0.

Styles are:

  • debug, info, warning and error for logger level rendering,
  • success, warning, failure, strong, mojo and project for message content
Default styles colors can be overridden through system properties, that can be set in MAVEN_OPTS environment variable (eventually in .mavenrc script):
  • system properties are named style.<style name>,
  • values are comma separated combination of bold, <color> and bg<color> (for background), where <color> is an ANSI color: black, red, green, yellow, blue, magenta, cyan or white, eventually with bright prefix