{"record":{"id":"7f2d948a5ce884aa","repo":"quarkusio/quarkus","slug":"invalid-value-s-for-option-stream-value-sh","errorCode":null,"errorMessage":"Invalid value '%s' for option '--stream'. Value should be specified as 'platformKey:streamId'. %s","messagePattern":"Invalid value '(.+?)' for option '--stream'\\. Value should be specified as 'platformKey:streamId'\\. (.+?)","errorType":"validation","errorClass":"ParameterException","httpStatus":null,"severity":"error","filePath":"devtools/cli-common/src/main/java/io/quarkus/cli/common/TargetQuarkusPlatformGroup.java","lineNumber":30,"sourceCode":"    PlatformStreamCoords streamCoords = null;\n    String validStream = null;\n\n    ArtifactCoords platformBom = null;\n    String validPlatformBom = null;\n\n    @CommandLine.Spec\n    CommandSpec spec;\n\n    @CommandLine.Option(paramLabel = \"platformKey:streamId\", names = { \"-S\",\n            \"--stream\" }, description = \"A target stream, for example:%n  3.15 or io.quarkus.platform:3.15\")\n    void setStream(String stream) {\n        stream = stream.trim();\n        if (!stream.isEmpty()) {\n            try {\n                streamCoords = PlatformStreamCoords.fromString(stream);\n                validStream = stream;\n            } catch (IllegalArgumentException iex) {\n                throw new CommandLine.ParameterException(spec.commandLine(),\n                        String.format(\"Invalid value '%s' for option '--stream'. \" +\n                                \"Value should be specified as 'platformKey:streamId'. %s\", stream, iex.getMessage()));\n            }\n        }\n    }\n\n    @CommandLine.Option(paramLabel = \"groupId:artifactId:version\", names = { \"-P\",\n            \"--platform-bom\" }, description = \"A specific Quarkus platform BOM, for example:%n\"\n                    + \"  \" + FULL_EXAMPLE + \"%n\"\n                    + \"  io.quarkus::999-SNAPSHOT\"\n                    + \"  3.15.2%n\"\n                    + \"Default groupId: \" + ToolsConstants.DEFAULT_PLATFORM_BOM_GROUP_ID + \"%n\"\n                    + \"Default artifactId: \" + ToolsConstants.DEFAULT_PLATFORM_BOM_ARTIFACT_ID + \"%n\")\n    void setPlatformBom(String bom) {\n        bom = bom.replaceFirst(\"^::\", \"\").trim();\n        if (!bom.isEmpty()) {\n            try {\n                int firstPos = bom.indexOf(\":\");","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/cli-common/src/main/java/io/quarkus/cli/common/TargetQuarkusPlatformGroup.java#L12-L48","documentation":"TargetQuarkusPlatformGroup.setStream parses the --stream option via PlatformStreamCoords.fromString, which expects 'platformKey:streamId'. On IllegalArgumentException it rethrows as a picocli ParameterException embedding the original value and the parser's message.","triggerScenarios":"`quarkus create`/`quarkus add extension` with `--stream` set to a string that cannot be parsed into platformKey:streamId — missing colon, more than one colon, or empty segments (e.g. `--stream io.quarkus.platform`, `--stream a:b:c`).","commonSituations":"Passing only the stream id ('2.13') without the platform key; using a full GAV of a platform BOM instead of key:stream; forgetting to quote values in shells that treat ':' specially (rare).","solutions":["Supply the value as 'platformKey:streamId', e.g. --stream io.quarkus.platform:2.16.","If you meant to pin an exact BOM, use --platform-bom GROUP:ARTIFACT:VERSION instead.","Omit --stream to use the default platform stream."],"exampleFix":"// before\nquarkus create app --stream 2.16 demo\n// after\nquarkus create app --stream io.quarkus.platform:2.16 demo","handlingStrategy":"validation","validationCode":"public static boolean isValidStream(String s) {\n    if (s == null) return true;\n    String[] p = s.trim().split(\":\");\n    return p.length == 2 && !p[0].isEmpty() && !p[1].isEmpty();\n}","typeGuard":"public static Optional<PlatformStreamCoords> tryParseStream(String s) {\n    try { return Optional.of(PlatformStreamCoords.fromString(s.trim())); }\n    catch (IllegalArgumentException e) { return Optional.empty(); }\n}","tryCatchPattern":"try {\n    createApp(options);\n} catch (CommandLine.ParameterException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"--stream\")) {\n        System.err.println(\"Use platformKey:streamId, e.g. io.quarkus.platform:2.16\");\n    } else throw e;\n}","preventionTips":["Always include both platformKey and streamId separated by a single colon.","Use --platform-bom GROUP:ARTIFACT:VERSION when pinning an exact BOM instead.","Copy the stream id from registry.quarkus.io or quarkus platform docs.","Trim user input before passing --stream."],"tags":["cli","picocli","validation","platform-stream"],"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-15T02:17:10.978Z"}