quarkusio/quarkus · error · GradleException
Unable to list platforms
Error message
Unable to list platforms
What it means
The QuarkusListPlatforms Gradle task (./gradlew listPlatforms) uses the ListPlatforms tool to print the Quarkus platforms imported into the project or available in the registry. Any Exception thrown by ListPlatforms.execute() is wrapped in this GradleException, indicating platform metadata could not be collected.
Source
Thrown at devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusListPlatforms.java:49
@TaskAction
public void listExtensions() {
getLogger().info("");
if (installed) {
getLogger().info("Imported Quarkus platforms:");
importedPlatforms().forEach(coords -> {
final StringBuilder buf = new StringBuilder();
buf.append(coords.getGroupId()).append(":")
.append(coords.getArtifactId().substring(0,
coords.getArtifactId().length() - Constants.PLATFORM_DESCRIPTOR_ARTIFACT_ID_SUFFIX.length()))
.append("::pom:").append(coords.getVersion());
messageWriter().info(buf.toString());
});
} else {
getLogger().info("Available Quarkus platforms:");
try {
new ListPlatforms(getQuarkusProject(installed)).execute();
} catch (Exception e) {
throw new GradleException("Unable to list platforms", e);
}
}
getLogger().info("");
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Run ./gradlew listPlatforms --stacktrace to see the wrapped cause.
- Verify the enforcedPlatform/quarkus-bom declaration and its version.
- Check connectivity to registry.quarkus.io and set proxy system properties if needed.
- Clear Gradle caches of io.quarkus.platform entries and re-resolve with --refresh-dependencies.
- If platforms are intentional, list extensions instead to confirm what is imported.
Example fix
// before ./gradlew listPlatforms // after: diagnose root cause ./gradlew listPlatforms --stacktrace --info
Defensive patterns
Strategy: retry
Validate before calling
// Ensure at least one platform is imported and registry is reachable ./gradlew dependencies --configuration runtimeClasspath | grep quarkus-bom curl -fsSL https://registry.quarkus.io/ > /dev/null && echo reachable
Try / catch
try {
./gradlew listPlatforms
} catch (GradleException e) {
if (e.getMessage().equals("Unable to list platforms")) {
// view wrapped cause with --stacktrace; verify BOM/network, clear stale platform cache entries, retry
}
} Prevention
- Declare enforcedPlatform(io.quarkus.platform:quarkus-bom) explicitly.
- Purge io.quarkus.platform cache entries after force-upgrading platforms.
- Verify TLS trust for corporate proxies intercepting registry traffic.
- Use ./gradlew --stacktrace routinely on Quarkus CLI tasks to surface wrapped causes.
When it happens
Trigger: Running ./gradlew listPlatforms when ListPlatforms.execute() throws: failure resolving imported platforms from the application model or contacting the extension registry; raised in QuarkusListPlatforms.listExtensions.
Common situations: No platforms declared in the project (unexpected state) combined with registry unavailability; broken platform versions in the BOM; network/proxy restrictions; corrupted caches holding stale platform metadata.
Related errors
- Unable to list extension categories
- Unable to list extensions
- Failed to resolve extension catalog
- Failed to initialize Quarkus extension catalog resolver
- Failed to resolve the recommended Quarkus extension catalog
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/10e88b5071d01883.
Report an issue: GitHub.