{"record":{"id":"b726f5266a4e228b","repo":"quarkusio/quarkus","slug":"unable-to-add-extensions","errorCode":null,"errorMessage":"Unable to add extensions","messagePattern":"Unable to add extensions","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/AddExtensionMojo.java","lineNumber":65,"sourceCode":"\n    @Override\n    public void doExecute(final QuarkusProject quarkusProject, final MessageWriter log)\n            throws MojoExecutionException {\n        Set<String> ext = new HashSet<>();\n        if (extensions != null && !extensions.isEmpty()) {\n            ext.addAll(extensions);\n        } else {\n            // Parse the \"extension\" just in case it contains several comma-separated values\n            // https://github.com/quarkusio/quarkus/issues/2393\n            ext.addAll(Arrays.stream(extension.split(\",\")).map(String::trim).collect(toSet()));\n        }\n\n        try {\n            AddExtensions addExtensions = new AddExtensions(quarkusProject)\n                    .extensions(ext.stream().map(String::trim).collect(toSet()));\n            final QuarkusCommandOutcome outcome = addExtensions.execute();\n            if (!outcome.isSuccess()) {\n                throw new MojoExecutionException(\"Unable to add extensions\");\n            }\n        } catch (Exception e) {\n            throw new MojoExecutionException(\"Unable to update the pom.xml file\", e);\n        }\n    }\n}\n","sourceCodeStart":47,"sourceCodeEnd":72,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/AddExtensionMojo.java#L47-L72","documentation":"AddExtensionMojo.doExecute throws this when the AddExtensions QuarkusCommandOutcome reports failure — the command ran but could not add the requested extensions (e.g. unknown extension artifact IDs). It is the failure branch distinct from the exception path which produces 'Unable to update the pom.xml file'.","triggerScenarios":"addExtensions.execute() returns outcome.isSuccess() == false, typically because one or more extension artifactIds were not found in the registry/catalog.","commonSituations":"Misspelled or wrong extension artifactId (e.g. 'postgres' instead of 'quarkus-jdbc-postgresql'); offline environment where the registry cannot be queried; project not recognized as a Quarkus project.","solutions":["Verify extension artifactIds with `mvn quarkus:list-extensions` and correct typos.","Check the full log output above the error for which extension failed.","Ensure network access to the extension registry and correct quarkus platform/BOM version."],"exampleFix":"// before\nmvn quarkus:add-extension -Dextensions=postgres\n// after\nmvn quarkus:add-extension -Dextensions=quarkus-jdbc-postgresql","handlingStrategy":"validation","validationCode":"mvn quarkus:list-extensions | grep -i <artifactId>   # verify the extension exists before adding","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { log.error('Extension add failed: check artifactIds with quarkus:list-extensions'); }","preventionTips":["Always confirm artifactIds via quarkus:list-extensions.","Use full artifactIds (quarkus-*) rather than guesses.","Keep the Quarkus platform BOM current."],"tags":["maven","extensions","build-tool"],"backgroundTag":"unknown-extension-artifact","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"}