quarkusio/quarkus · error · MojoExecutionException

Failed to list platforms

Error message

Failed to list platforms

What it means

ListPlatformsMojo (`mvn quarkus:list-platforms`) lists Quarkus platforms known to the configured registry. Any exception from executing the ListPlatforms command is wrapped as this MojoExecutionException.

Source

Thrown at devtools/maven/src/main/java/io/quarkus/maven/ListPlatformsMojo.java:40

    protected boolean installed;

    @Override
    public void doExecute(final QuarkusProject quarkusProject, final MessageWriter log) throws MojoExecutionException {
        if (installed) {
            getImportedPlatforms().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());
                log.info(buf.toString());
            });
            return;
        }
        try {
            new ListPlatforms(quarkusProject).execute();
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to list platforms", e);
        }
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Verify quarkus.registry is a valid reachable URL
  2. Fix TLS trust (import corporate CA into the JVM truststore) if certificates fail
  3. Check proxy/firewall rules blocking the registry host
  4. Re-run with -e for root cause
  5. Retry on transient registry errors

Example fix

// before
-Dquarkus.registry=registry.quarkus.io  // missing scheme
// after
-Dquarkus.registry=https://registry.quarkus.io
Defensive patterns

Strategy: try-catch

Validate before calling

// validate the registry URL is well-formed and reachable before invoking
URI r = URI.create("https://registry.quarkus.io");
assert r.getScheme() != null; // must be https

Try / catch

try {
    // mvn quarkus:list-platforms
} catch (MojoExecutionException e) {
    log.error("Platform listing failed: " + e.getCause().getMessage());
}

Prevention

When it happens

Trigger: Running `mvn quarkus:list-platforms` when the registry request fails (network, DNS, HTTP error) or the quarkus project bootstrap fails.

Common situations: Air-gapped environments; invalid quarkus.registry URL; TLS certificate issues with custom CAs; registry service outage.

Related errors


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