quarkusio/quarkus · error · ParameterException

Invalid value '%s' for option '--stream'. Value should be sp

Error message

Invalid value '%s' for option '--stream'. Value should be specified as 'platformKey:streamId'. %s

What it means

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.

Source

Thrown at devtools/cli-common/src/main/java/io/quarkus/cli/common/TargetQuarkusPlatformGroup.java:30

    PlatformStreamCoords streamCoords = null;
    String validStream = null;

    ArtifactCoords platformBom = null;
    String validPlatformBom = null;

    @CommandLine.Spec
    CommandSpec spec;

    @CommandLine.Option(paramLabel = "platformKey:streamId", names = { "-S",
            "--stream" }, description = "A target stream, for example:%n  3.15 or io.quarkus.platform:3.15")
    void setStream(String stream) {
        stream = stream.trim();
        if (!stream.isEmpty()) {
            try {
                streamCoords = PlatformStreamCoords.fromString(stream);
                validStream = stream;
            } catch (IllegalArgumentException iex) {
                throw new CommandLine.ParameterException(spec.commandLine(),
                        String.format("Invalid value '%s' for option '--stream'. " +
                                "Value should be specified as 'platformKey:streamId'. %s", stream, iex.getMessage()));
            }
        }
    }

    @CommandLine.Option(paramLabel = "groupId:artifactId:version", names = { "-P",
            "--platform-bom" }, description = "A specific Quarkus platform BOM, for example:%n"
                    + "  " + FULL_EXAMPLE + "%n"
                    + "  io.quarkus::999-SNAPSHOT"
                    + "  3.15.2%n"
                    + "Default groupId: " + ToolsConstants.DEFAULT_PLATFORM_BOM_GROUP_ID + "%n"
                    + "Default artifactId: " + ToolsConstants.DEFAULT_PLATFORM_BOM_ARTIFACT_ID + "%n")
    void setPlatformBom(String bom) {
        bom = bom.replaceFirst("^::", "").trim();
        if (!bom.isEmpty()) {
            try {
                int firstPos = bom.indexOf(":");

View on GitHub (pinned to e1c734241f)

Solutions

  1. Supply the value as 'platformKey:streamId', e.g. --stream io.quarkus.platform:2.16.
  2. If you meant to pin an exact BOM, use --platform-bom GROUP:ARTIFACT:VERSION instead.
  3. Omit --stream to use the default platform stream.

Example fix

// before
quarkus create app --stream 2.16 demo
// after
quarkus create app --stream io.quarkus.platform:2.16 demo
Defensive patterns

Strategy: validation

Validate before calling

public static boolean isValidStream(String s) {
    if (s == null) return true;
    String[] p = s.trim().split(":");
    return p.length == 2 && !p[0].isEmpty() && !p[1].isEmpty();
}

Type guard

public static Optional<PlatformStreamCoords> tryParseStream(String s) {
    try { return Optional.of(PlatformStreamCoords.fromString(s.trim())); }
    catch (IllegalArgumentException e) { return Optional.empty(); }
}

Try / catch

try {
    createApp(options);
} catch (CommandLine.ParameterException e) {
    if (e.getMessage() != null && e.getMessage().contains("--stream")) {
        System.err.println("Use platformKey:streamId, e.g. io.quarkus.platform:2.16");
    } else throw e;
}

Prevention

When it happens

Trigger: `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`).

Common situations: 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).

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/7f2d948a5ce884aa. Report an issue: GitHub.