quarkusio/quarkus · error · MojoExecutionException
Invalid stream value '${stream}'. Value should be specified
Error message
Invalid stream value '${stream}'. Value should be specified as 'platformKey:streamId', for example: 3.15 or io.quarkus.platform:3.15 What it means
The 'stream' parameter is parsed via PlatformStreamCoords.fromString(), which expects 'platformKey:streamId' (or a bare stream id such as '3.15'). If parsing throws IllegalArgumentException, this MojoExecutionException is thrown, echoing the invalid value and the expected format. It is a pure input-format validation error raised before any network resolution happens.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java:419
log.warn(e.getLocalizedMessage());
mojo.getLog().debug(e);
}
}
return resolveExtensionCatalogDirectly(mojo, groupId, artifactId, version, catalogResolver, artifactResolver, log);
}
private static ExtensionCatalog resolveExtensionsCatalogForStream(AbstractMojo mojo, String stream,
ExtensionCatalogResolver catalogResolver) throws MojoExecutionException {
if (!catalogResolver.hasRegistries()) {
throw new MojoExecutionException(
"Specifying a stream requires the Quarkus extension registry client."
+ " Please make sure the registry client is enabled.");
}
final PlatformStreamCoords streamCoords;
try {
streamCoords = PlatformStreamCoords.fromString(stream.trim());
} catch (IllegalArgumentException e) {
throw new MojoExecutionException(
"Invalid stream value '" + stream + "'."
+ " Value should be specified as 'platformKey:streamId', for example: 3.15 or io.quarkus.platform:3.15",
e);
}
try {
return catalogResolver.resolveExtensionCatalog(streamCoords);
} catch (RegistryResolutionException e) {
throw new MojoExecutionException("Failed to resolve the extension catalog for stream '" + stream + "'", e);
}
}
private static ExtensionCatalog resolveExtensionCatalogDirectly(AbstractMojo mojo, String groupId, String artifactId,
String version,
ExtensionCatalogResolver catalogResolver, MavenArtifactResolver artifactResolver, MessageWriter log) {
groupId = getPlatformGroupId(mojo, groupId);
artifactId = getPlatformArtifactId(artifactId);
version = getPlatformVersion(mojo, version);
final ExtensionCatalog catalog = ToolsUtils.resolvePlatformDescriptorDirectly(groupId, artifactId, version,View on GitHub (pinned to e1c734241f)
Solutions
- Use the plain stream id format, e.g. -Dstream=3.15
- Use the fully qualified form platformKey:streamId, e.g. -Dstream=io.quarkus.platform:3.15
- Trim the value and remove stray quotes/whitespace before passing it
- Check the accepted grammar in PlatformStreamCoords.fromString for your Quarkus version
Example fix
# before mvn quarkus:create -Dstream="3.15.1.Final" # after mvn quarkus:create -Dstream=3.15
Defensive patterns
Strategy: validation
Validate before calling
// Validate stream format before passing it
static boolean isValidStream(String s) {
if (s == null) return false;
String v = s.trim();
return v.matches("[A-Za-z0-9._-]+(:[A-Za-z0-9._-]+)?"); // e.g. 3.15 or io.quarkus.platform:3.15
} Type guard
boolean isPlatformKeyStreamId(String s) { return s != null && s.chars().filter(c -> c == ':').count() <= 1 && !s.trim().isEmpty(); } Try / catch
try { coords = PlatformStreamCoords.fromString(stream.trim()); } catch (IllegalArgumentException e) { throw new IllegalArgumentException("Expected 'platformKey:streamId', e.g. 3.15; got: " + stream, e); } Prevention
- Quote -Dstream values in shells to avoid whitespace injection
- Use bare stream ids like 3.15 (no patch version, no 'v' prefix)
- Sanitize CI variables (trim, strip quotes) before passing them
When it happens
Trigger: Running `mvn quarkus:create -Dstream="foo bar"` or any stream value with an unexpected format, e.g. spaces, too many colons ('a:b:c'), or empty platformKey segment.
Common situations: Quoting issues in shells or CI where extra whitespace/characters sneak in; using a version string like 'v3.15.1' or '3.15.1.Final' where a stream id like '3.15' is expected; typos like '3_15'.
Related errors
- The specified %s identifier (%s) contains invalid characters
- One or more errors happened during the configuration documen
- ${BAD_IDENTIFIER formatted with 'artifactId' and projectArti
- ${BAD_IDENTIFIER formatted with 'groupId' and projectGroupId
- Unrecognized dependency flag '<trimmed>'. Supported flags: O
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/d3296500f0a003c1.
Report an issue: GitHub.