quarkusio/quarkus · error · QuarkusCommandException
Failed to add extensions
Error message
Failed to add extensions
What it means
AddExtensionsCommandHandler.execute wraps any IOException that occurs while resolving or adding extensions into a QuarkusCommandException('Failed to add extensions'). It signals the add-extensions command aborted due to I/O problems (catalog access, pom read/write) rather than unmatched keywords.
Source
Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/AddExtensionsCommandHandler.java:100
.info(FAILURE_ICON + " Nothing installed because keyword(s) '"
+ String.join("', '", extensionInstallPlan.getInvalidKeywords())
+ "' were invalid.");
}
} else {
invocation.log()
.info(FAILURE_ICON + " The provided keyword(s) did not match any extension from the catalog.");
}
} catch (MultipleExtensionsFoundException m) {
StringBuilder sb = new StringBuilder();
sb.append(ERROR_ICON + " Multiple extensions matching '").append(m.getKeyword()).append("'");
m.getExtensions()
.forEach(extension -> sb.append(System.lineSeparator()).append(" - ")
.append(extension.managementKey()));
sb.append(System.lineSeparator())
.append(" Be more specific e.g using the exact name or the full GAV.");
invocation.log().info(sb.toString());
} catch (IOException e) {
throw new QuarkusCommandException("Failed to add extensions", e);
}
return QuarkusCommandOutcome.failure("see logs above for more details").setValue(AddExtensions.OUTCOME_UPDATED, false);
}
public ExtensionInstallPlan planInstallation(QuarkusCommandInvocation invocation, Collection<String> keywords)
throws IOException {
if (keywords.isEmpty()) {
return ExtensionInstallPlan.EMPTY;
}
final ExtensionCatalog catalog = invocation.getExtensionsCatalog();
final String quarkusCore = catalog.getQuarkusCoreVersion();
final Collection<ArtifactCoords> importedPlatforms = invocation.getQuarkusProject().getExtensionManager()
.getInstalledPlatforms();
// TODO
Set<ArtifactCoords> preferredBoms = Collections.emptySet();
ExtensionInstallPlan.Builder builder = ExtensionInstallPlan.builder();View on GitHub (pinned to e1c734241f)
Solutions
- Inspect the cause stack trace (logged) to identify the underlying IOException
- Verify the project pom.xml exists and is writable
- Check network connectivity / registry URL configuration for the extensions catalog
- Retry the command; for offline use ensure a local registry cache is available
Defensive patterns
Strategy: try-catch
Validate before calling
Path pom = projectDir.resolve("pom.xml");
if (!Files.isRegularFile(pom) || !Files.isWritable(pom)) throw new IllegalStateException("pom.xml missing or not writable"); Try / catch
try { handler.execute(invocation); } catch (QuarkusCommandException e) { if (e.getCause() instanceof IOException io) { /* inspect io, check pom/network */ } } Prevention
- Keep pom.xml writable and committed/clean before running add-extensions
- Ensure registry URLs are reachable; configure offline cache for CI
- Avoid concurrent processes touching the same pom
- Pin a platform version so the catalog resolves consistently
When it happens
Trigger: Executing the add-extensions command (AddExtensionsCommandHandler.execute) when reading the extension registry/catalog or transforming the project pom throws IOException.
Common situations: Unwritable or corrupt pom.xml; network failure fetching the registry catalog; interrupted downloads; disk full while writing the pom.
Related errors
- Unable to render all config
- Unable to create directory: ${directory}
- Unable to collect the target directories
- Unable to read the template: ${template}
- Unable to close InputStream for template: ${template}
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/97b059a7cc7f691f.
Report an issue: GitHub.