{"record":{"id":"97b059a7cc7f691f","repo":"quarkusio/quarkus","slug":"failed-to-add-extensions","errorCode":null,"errorMessage":"Failed to add extensions","messagePattern":"Failed to add extensions","errorType":"exception","errorClass":"QuarkusCommandException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/AddExtensionsCommandHandler.java","lineNumber":100,"sourceCode":"                            .info(FAILURE_ICON + \" Nothing installed because keyword(s) '\"\n                                    + String.join(\"', '\", extensionInstallPlan.getInvalidKeywords())\n                                    + \"' were invalid.\");\n                }\n            } else {\n                invocation.log()\n                        .info(FAILURE_ICON + \" The provided keyword(s) did not match any extension from the catalog.\");\n            }\n        } catch (MultipleExtensionsFoundException m) {\n            StringBuilder sb = new StringBuilder();\n            sb.append(ERROR_ICON + \" Multiple extensions matching '\").append(m.getKeyword()).append(\"'\");\n            m.getExtensions()\n                    .forEach(extension -> sb.append(System.lineSeparator()).append(\"     - \")\n                            .append(extension.managementKey()));\n            sb.append(System.lineSeparator())\n                    .append(\"     Be more specific e.g using the exact name or the full GAV.\");\n            invocation.log().info(sb.toString());\n        } catch (IOException e) {\n            throw new QuarkusCommandException(\"Failed to add extensions\", e);\n        }\n\n        return QuarkusCommandOutcome.failure(\"see logs above for more details\").setValue(AddExtensions.OUTCOME_UPDATED, false);\n    }\n\n    public ExtensionInstallPlan planInstallation(QuarkusCommandInvocation invocation, Collection<String> keywords)\n            throws IOException {\n        if (keywords.isEmpty()) {\n            return ExtensionInstallPlan.EMPTY;\n        }\n        final ExtensionCatalog catalog = invocation.getExtensionsCatalog();\n        final String quarkusCore = catalog.getQuarkusCoreVersion();\n        final Collection<ArtifactCoords> importedPlatforms = invocation.getQuarkusProject().getExtensionManager()\n                .getInstalledPlatforms();\n        // TODO\n        Set<ArtifactCoords> preferredBoms = Collections.emptySet();\n\n        ExtensionInstallPlan.Builder builder = ExtensionInstallPlan.builder();","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/AddExtensionsCommandHandler.java#L82-L118","documentation":"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.","triggerScenarios":"Executing the add-extensions command (AddExtensionsCommandHandler.execute) when reading the extension registry/catalog or transforming the project pom throws IOException.","commonSituations":"Unwritable or corrupt pom.xml; network failure fetching the registry catalog; interrupted downloads; disk full while writing the pom.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"Path pom = projectDir.resolve(\"pom.xml\");\nif (!Files.isRegularFile(pom) || !Files.isWritable(pom)) throw new IllegalStateException(\"pom.xml missing or not writable\");","typeGuard":null,"tryCatchPattern":"try { handler.execute(invocation); } catch (QuarkusCommandException e) { if (e.getCause() instanceof IOException io) { /* inspect io, check pom/network */ } }","preventionTips":["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"],"tags":["io","extensions","maven"],"backgroundTag":"extension-install-io-error","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}