{"record":{"id":"d2cfe569d363bf9d","repo":"apache/maven","slug":"invalid-color-configuration-value-stylecolor","errorCode":null,"errorMessage":"Invalid color configuration value '${styleColor}'. Supported are 'auto', 'always', 'never'.","messagePattern":"Invalid color configuration value '(.+?)'\\. Supported are 'auto', 'always', 'never'\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java","lineNumber":278,"sourceCode":"        if (System.getProperty(\"guice_custom_class_loading\", \"\").isBlank()) {\n            System.setProperty(\"guice_custom_class_loading\", \"CHILD\");\n        }\n    }\n\n    protected void configureLogging(C context) throws Exception {\n        // LOG COLOR\n        Map<String, String> effectiveProperties = context.protoSession.getEffectiveProperties();\n        String styleColor = context.options()\n                .color()\n                .orElse(effectiveProperties.getOrDefault(\n                        Constants.MAVEN_STYLE_COLOR_PROPERTY, effectiveProperties.getOrDefault(\"style.color\", \"auto\")))\n                .toLowerCase(Locale.ENGLISH);\n        if (\"always\".equals(styleColor) || \"yes\".equals(styleColor) || \"force\".equals(styleColor)) {\n            context.coloredOutput = true;\n        } else if (\"never\".equals(styleColor) || \"no\".equals(styleColor) || \"none\".equals(styleColor)) {\n            context.coloredOutput = false;\n        } else if (!\"auto\".equals(styleColor) && !\"tty\".equals(styleColor) && !\"if-tty\".equals(styleColor)) {\n            throw new IllegalArgumentException(\n                    \"Invalid color configuration value '\" + styleColor + \"'. Supported are 'auto', 'always', 'never'.\");\n        } else {\n            boolean isBatchMode = !context.options().forceInteractive().orElse(false)\n                    && context.options().nonInteractive().orElse(false);\n            if (isBatchMode || context.options().logFile().isPresent()) {\n                context.coloredOutput = false;\n            }\n        }\n\n        context.loggerFactory = LoggerFactory.getILoggerFactory();\n        context.slf4jConfiguration = Slf4jConfigurationFactory.getConfiguration(context.loggerFactory);\n\n        if (context.invokerRequest.effectiveVerbose()) {\n            context.loggerLevel = Slf4jConfiguration.Level.DEBUG;\n            context.slf4jConfiguration.setRootLoggerLevel(context.loggerLevel);\n        } else if (context.options().quiet().orElse(false)) {\n            context.loggerLevel = Slf4jConfiguration.Level.ERROR;\n            context.slf4jConfiguration.setRootLoggerLevel(context.loggerLevel);","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java#L260-L296","documentation":"Error \"Invalid color configuration value '${styleColor}'. Supported are 'auto', 'always', 'never'.\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}