apache/maven · error · IllegalArgumentException
Invalid color configuration value '${styleColor}'. Supported
Error message
Invalid color configuration value '${styleColor}'. Supported are 'auto', 'always', 'never'. What it means
Error "Invalid color configuration value '${styleColor}'. Supported are 'auto', 'always', 'never'." thrown in apache/maven.
Source
Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java:278
if (System.getProperty("guice_custom_class_loading", "").isBlank()) {
System.setProperty("guice_custom_class_loading", "CHILD");
}
}
protected void configureLogging(C context) throws Exception {
// LOG COLOR
Map<String, String> effectiveProperties = context.protoSession.getEffectiveProperties();
String styleColor = context.options()
.color()
.orElse(effectiveProperties.getOrDefault(
Constants.MAVEN_STYLE_COLOR_PROPERTY, effectiveProperties.getOrDefault("style.color", "auto")))
.toLowerCase(Locale.ENGLISH);
if ("always".equals(styleColor) || "yes".equals(styleColor) || "force".equals(styleColor)) {
context.coloredOutput = true;
} else if ("never".equals(styleColor) || "no".equals(styleColor) || "none".equals(styleColor)) {
context.coloredOutput = false;
} else if (!"auto".equals(styleColor) && !"tty".equals(styleColor) && !"if-tty".equals(styleColor)) {
throw new IllegalArgumentException(
"Invalid color configuration value '" + styleColor + "'. Supported are 'auto', 'always', 'never'.");
} else {
boolean isBatchMode = !context.options().forceInteractive().orElse(false)
&& context.options().nonInteractive().orElse(false);
if (isBatchMode || context.options().logFile().isPresent()) {
context.coloredOutput = false;
}
}
context.loggerFactory = LoggerFactory.getILoggerFactory();
context.slf4jConfiguration = Slf4jConfigurationFactory.getConfiguration(context.loggerFactory);
if (context.invokerRequest.effectiveVerbose()) {
context.loggerLevel = Slf4jConfiguration.Level.DEBUG;
context.slf4jConfiguration.setRootLoggerLevel(context.loggerLevel);
} else if (context.options().quiet().orElse(false)) {
context.loggerLevel = Slf4jConfiguration.Level.ERROR;
context.slf4jConfiguration.setRootLoggerLevel(context.loggerLevel);View on GitHub (pinned to e4093d4e12)
When it happens
Trigger: Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java:278 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/d2cfe569d363bf9d.
Report an issue: GitHub.