quarkusio/quarkus · error · IllegalArgumentException
BOM version was not provided
Error message
BOM version was not provided
What it means
ToolsUtils.resolvePlatformDescriptorDirectly resolves a platform BOM's descriptor artifact; the version is mandatory because it is used both as the artifact version and classifier-like field. If bomVersion is null, IllegalArgumentException('BOM version was not provided') is thrown.
Source
Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java:125
}
int count = 0;
while (i >= 0) {
++count;
i = str.indexOf(ch, i + 1);
}
return count;
}
public static ExtensionCatalog resolvePlatformDescriptorDirectly(String bomGroupId, String bomArtifactId, String bomVersion,
MavenArtifactResolver artifactResolver, MessageWriter log) {
return resolvePlatformDescriptorDirectly(bomGroupId, bomArtifactId, bomVersion, artifactResolver, log, 1);
}
private static ExtensionCatalog resolvePlatformDescriptorDirectly(String bomGroupId, String bomArtifactId,
String bomVersion,
MavenArtifactResolver artifactResolver, MessageWriter log, int registryPreference) {
if (bomVersion == null) {
throw new IllegalArgumentException("BOM version was not provided");
}
Artifact catalogCoords = new DefaultArtifact(
bomGroupId == null ? ToolsConstants.DEFAULT_PLATFORM_BOM_GROUP_ID : bomGroupId,
(bomArtifactId == null ? ToolsConstants.DEFAULT_PLATFORM_BOM_ARTIFACT_ID : bomArtifactId)
+ BootstrapConstants.PLATFORM_DESCRIPTOR_ARTIFACT_ID_SUFFIX,
bomVersion, "json", bomVersion);
Path platformJson = null;
try {
log.debug("Resolving platform descriptor %s", catalogCoords);
platformJson = artifactResolver.resolve(catalogCoords).getArtifact().getFile().toPath();
} catch (Exception e) {
if (bomGroupId == null && catalogCoords.getArtifactId().startsWith("quarkus-bom")) {
catalogCoords = new DefaultArtifact(
ToolsConstants.IO_QUARKUS,
"quarkus-bom" + BootstrapConstants.PLATFORM_DESCRIPTOR_ARTIFACT_ID_SUFFIX,
catalogCoords.getClassifier(), catalogCoords.getExtension(), catalogCoords.getVersion());
try {View on GitHub (pinned to e1c734241f)
Solutions
- Pass the platform version explicitly, e.g. -Dquarkus.platform.version=<version> when invoking the tooling
- Set quarkus.platform.version in the Maven/Gradle build configuration
- If writing code against this API, guard/require the version argument before calling
Example fix
// before ToolsUtils.resolvePlatformDescriptor(null, null, null, resolver, log, 0); // version null // after ToolsUtils.resolvePlatformDescriptor(null, null, "3.2.0.Final", resolver, log, 0);
Defensive patterns
Strategy: validation
Validate before calling
String version = props.getProperty("quarkus.platform.version");
if (version == null || version.isBlank()) {
throw new IllegalArgumentException("quarkus.platform.version must be set before resolving the platform descriptor");
}
ToolsUtils.resolvePlatformDescriptorDirectly(g, a, version, resolver, log, 0); Try / catch
try {
ExtensionCatalog cat = ToolsUtils.resolvePlatformDescriptorDirectly(g, a, v, resolver, log, 0);
} catch (IllegalArgumentException e) {
if (e.getMessage().equals("BOM version was not provided")) {
throw new IllegalStateException("Configure quarkus.platform.version (e.g. -Dquarkus.platform.version=3.2.0.Final)", e);
}
throw e;
} Prevention
- Always set quarkus.platform.version in pom.xml/build scripts using these tools
- Null-check the version argument at API boundaries before calling resolution
- Do not assume default BOM coordinates supply a version — only groupId/artifactId are defaulted
When it happens
Trigger: Calling resolvePlatformDescriptorDirectly (directly or via the public resolvePlatformDescriptor overload) with a groupId/artifactId but null version; omitting the version when invoking platform descriptor resolution from tools that did not pass a platform version property.
Common situations: quarkus.platform.version not set in the build; custom tooling calling ToolsUtils.resolvePlatformDescriptor without the version argument; expecting the default BOM coordinates to imply a version (they only default groupId/artifactId).
Related errors
- Unsupported format: ${format}
- No platforms detected in the project
- Either the `extension` or `extensions` parameter must be set
- Cannot specify both class and method name
- The project artifact's extension is '${extension}' while thi
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/43a3b4aa1dadc5b7.
Report an issue: GitHub.