{"record":{"id":"e3bb88ffd38976b8","repo":"quarkusio/quarkus","slug":"invalid-value-s-for-option-platform-bom-va","errorCode":null,"errorMessage":"Invalid value '%s' for option '--platform-bom'. Value should be specified as 'GROUP-ID:ARTIFACT-ID:VERSION'. %s","messagePattern":"Invalid value '(.+?)' for option '--platform-bom'\\. Value should be specified as 'GROUP-ID:ARTIFACT-ID:VERSION'\\. (.+?)","errorType":"validation","errorClass":"ParameterException","httpStatus":null,"severity":"error","filePath":"devtools/cli-common/src/main/java/io/quarkus/cli/common/TargetQuarkusPlatformGroup.java","lineNumber":77,"sourceCode":"                                ToolsConstants.DEFAULT_PLATFORM_BOM_ARTIFACT_ID,\n                                VersionHelper.clientVersion());\n                    } else {\n                        // some.group::version, use default artifact id\n                        setBom(bom.substring(0, firstPos),\n                                ToolsConstants.DEFAULT_PLATFORM_BOM_ARTIFACT_ID,\n                                bom.substring(lastPos + 1));\n                    }\n                } else if (firstPos == 0 && lastPos == bom.length() - 1) {\n                    // :my-bom:, use default group and version\n                    setBom(ToolsConstants.DEFAULT_PLATFORM_BOM_GROUP_ID,\n                            bom.substring(1, lastPos),\n                            VersionHelper.clientVersion());\n                } else {\n                    platformBom = ArtifactCoords.fromString(bom);\n                    validPlatformBom = bom; // keep original (valid) string (dryrun)\n                }\n            } catch (IllegalArgumentException iex) {\n                throw new CommandLine.ParameterException(spec.commandLine(),\n                        String.format(\"Invalid value '%s' for option '--platform-bom'. \" +\n                                \"Value should be specified as 'GROUP-ID:ARTIFACT-ID:VERSION'. %s\", bom, iex.getMessage()));\n            }\n        }\n    }\n\n    public boolean isPlatformSpecified() {\n        return platformBom != null;\n    }\n\n    public ArtifactCoords getPlatformBom() {\n        return platformBom;\n    }\n\n    public boolean isStreamSpecified() {\n        return streamCoords != null;\n    }\n","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/cli-common/src/main/java/io/quarkus/cli/common/TargetQuarkusPlatformGroup.java#L59-L95","documentation":"TargetQuarkusPlatformGroup.setPlatformBom parses the --platform-bom option with ArtifactCoords.fromString, expecting 'GROUP-ID:ARTIFACT-ID:VERSION'. Parse failures (IllegalArgumentException) are rethrown as a picocli ParameterException that echoes the input and the parser's explanation.","triggerScenarios":"Passing --platform-bom a value that is not a well-formed 3-part coordinate: missing version, missing artifact id, extra segments, or illegal characters — e.g. `--platform-bom io.quarkus.platform`, `--platform-bom io.quarkus.platform:quarkus-bom:2.16.0.Final:extra`.","commonSituations":"Giving just the group or groupId:artifactId and forgetting the :VERSION; pasting a full Maven GAV with classifier; confusing --platform-bom with --stream syntax.","solutions":["Provide all three segments: --platform-bom io.quarkus.platform:quarkus-bom:2.16.0.Final.","If you only want a stream rather than an exact BOM, use --stream platformKey:streamId instead.","Verify the version string exists (no stray spaces or characters) by checking Maven Central."],"exampleFix":"// before\nquarkus create app --platform-bom io.quarkus.platform demo\n// after\nquarkus create app --platform-bom io.quarkus.platform:quarkus-bom:2.16.0.Final demo","handlingStrategy":"validation","validationCode":"public static boolean isValidBomCoord(String s) {\n    if (s == null) return false;\n    String[] p = s.trim().split(\":\");\n    return p.length == 3 && !p[0].isEmpty() && !p[1].isEmpty() && !p[2].isEmpty();\n}","typeGuard":"public static Optional<ArtifactCoords> tryParseBom(String s) {\n    try { return Optional.of(ArtifactCoords.fromString(s.trim())); }\n    catch (IllegalArgumentException e) { return Optional.empty(); }\n}","tryCatchPattern":"try {\n    createApp(opts);\n} catch (CommandLine.ParameterException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"--platform-bom\")) {\n        System.err.println(\"Expected GROUP-ID:ARTIFACT-ID:VERSION, e.g. io.quarkus.platform:quarkus-bom:2.16.0.Final\");\n    } else throw e;\n}","preventionTips":["Provide exactly three colon-separated segments including VERSION.","Don't append classifier/packaging segments to --platform-bom.","Validate the coordinate resolves on Maven Central before scripting it.","Prefer --stream when you don't need a pinned exact BOM."],"tags":["cli","picocli","validation","maven-coordinates"],"backgroundTag":"invalid-option-value-format","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}