{"record":{"id":"3ee9ac19de3d7357","repo":"quarkusio/quarkus","slug":"unrecognized-dependency-flag-trimmed-supporte","errorCode":null,"errorMessage":"Unrecognized dependency flag '<trimmed>'. Supported flags: OPTIONAL, DIRECT, RUNTIME_CP, DEPLOYMENT_CP, RUNTIME_EXTENSION_ARTIFACT, WORKSPACE_MODULE, RELOADABLE, TOP_LEVEL_RUNTIME_EXTENSION_ARTIFACT, CLASSLOADER_PARENT_FIRST, CLASSLOADER_RUNNER_PARENT_FIRST, CLASSLOADER_LESSER_PRIORITY, COMPILE_ONLY","messagePattern":"Unrecognized dependency flag '<trimmed>'\\. Supported flags: OPTIONAL, DIRECT, RUNTIME_CP, DEPLOYMENT_CP, RUNTIME_EXTENSION_ARTIFACT, WORKSPACE_MODULE, RELOADABLE, TOP_LEVEL_RUNTIME_EXTENSION_ARTIFACT, CLASSLOADER_PARENT_FIRST, CLASSLOADER_RUNNER_PARENT_FIRST, CLASSLOADER_LESSER_PRIORITY, COMPILE_ONLY","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/DependencyListMojo.java","lineNumber":210,"sourceCode":"        lines.sort(null);\n        for (String line : lines) {\n            log.accept(line);\n        }\n    }\n\n    private int parseFlags() throws MojoExecutionException {\n        if (flags == null || flags.isBlank()) {\n            return 0;\n        }\n        int result = 0;\n        for (String name : flags.split(\",\")) {\n            final String trimmed = name.trim();\n            if (trimmed.isEmpty()) {\n                continue;\n            }\n            final Integer flagValue = FLAG_NAMES.get(trimmed.toLowerCase(Locale.ROOT));\n            if (flagValue == null) {\n                throw new MojoExecutionException(\n                        \"Unrecognized dependency flag '\" + trimmed + \"'. Supported flags: \" + String.join(\", \",\n                                \"OPTIONAL\", \"DIRECT\", \"RUNTIME_CP\", \"DEPLOYMENT_CP\",\n                                \"RUNTIME_EXTENSION_ARTIFACT\", \"WORKSPACE_MODULE\", \"RELOADABLE\",\n                                \"TOP_LEVEL_RUNTIME_EXTENSION_ARTIFACT\", \"CLASSLOADER_PARENT_FIRST\",\n                                \"CLASSLOADER_RUNNER_PARENT_FIRST\", \"CLASSLOADER_LESSER_PRIORITY\",\n                                \"COMPILE_ONLY\"));\n            }\n            result |= flagValue;\n        }\n        return result;\n    }\n\n    private ApplicationModel resolveApplicationModel(int flags) throws MojoExecutionException {\n        final ArtifactCoords appArtifact = ArtifactCoords.pom(project.getGroupId(), project.getArtifactId(),\n                project.getVersion());\n        final BootstrapAppModelResolver modelResolver;\n        try {\n            modelResolver = new BootstrapAppModelResolver(resolver())","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/DependencyListMojo.java#L192-L228","documentation":"DependencyListMojo.parseFlags converts a comma-separated dependency-flags string into a bitmask using the known FLAG_NAMES table (OPTIONAL, DIRECT, RUNTIME_CP, DEPLOYMENT_CP, RUNTIME_EXTENSION_ARTIFACT, WORKSPACE_MODULE, RELOADABLE, TOP_LEVEL_RUNTIME_EXTENSION_ARTIFACT, CLASSLOADER_PARENT_FIRST, CLASSLOADER_RUNNER_PARENT_FIRST, CLASSLOADER_LESSER_PRIORITY, COMPILE_ONLY). An unknown token throws a MojoExecutionException listing all supported flags.","triggerScenarios":"Passing quarkus:dependency-list (or -D...flags style) configuration containing a flag token whose trimmed, lowercased value is not in FLAG_NAMES, e.g. -Ddependencies.flags=runtime,cp or a typo like DEPLOYEMNT_CP.","commonSituations":"Typos or wrong casing assumptions in flag names; using flags from maven-dependency-plugin (e.g. 'verbose', 'includeScope') that the Quarkus mojo does not support; older/newer Quarkus versions with a different flag set; commas vs other separators confusion.","solutions":["Correct the flag spelling to one of the supported names listed in the error message","Remove unsupported flags borrowed from other plugins","Check the documentation of your Quarkus version for the exact supported flag set"],"exampleFix":"// before\nmvn quarkus:dependency-list -Ddependencies.flags=runtime_cp,optional\n// after\nmvn quarkus:dependency-list -Ddependencies.flags=RUNTIME_CP,OPTIONAL","handlingStrategy":"validation","validationCode":"// Validate the flags string against the supported set before invoking the goal\njava.util.Set<String> SUPPORTED = java.util.Set.of(\"OPTIONAL\", \"DIRECT\", \"RUNTIME_CP\", \"DEPLOYMENT_CP\",\n        \"RUNTIME_EXTENSION_ARTIFACT\", \"WORKSPACE_MODULE\", \"RELOADABLE\",\n        \"TOP_LEVEL_RUNTIME_EXTENSION_ARTIFACT\", \"CLASSLOADER_PARENT_FIRST\",\n        \"CLASSLOADER_RUNNER_PARENT_FIRST\", \"CLASSLOADER_LESSER_PRIORITY\", \"COMPILE_ONLY\");\nfor (String token : flags.split(\",\")) {\n    String t = token.trim();\n    if (!t.isEmpty() && !SUPPORTED.contains(t.toUpperCase(java.util.Locale.ROOT))) {\n        throw new IllegalStateException(\"Unsupported dependency flag: \" + t);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    mojo.execute();\n} catch (MojoExecutionException e) {\n    if (e.getMessage().startsWith(\"Unrecognized dependency flag\")) {\n        // read the 'Supported flags:' list from the message and correct the value\n    }\n}","preventionTips":["Copy flag names only from the official Quarkus documentation for your version","Don't reuse maven-dependency-plugin flag names with quarkus mojos","Keep flag strings in a single scripted variable so they are validated once"],"tags":["maven","configuration","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}