{"record":{"id":"37548fe788e18421","repo":"quarkusio/quarkus","slug":"unable-to-update-the-pom-xml-file-37548f","errorCode":null,"errorMessage":"Unable to update the pom.xml file","messagePattern":"Unable to update the pom\\.xml file","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/RemoveExtensionMojo.java","lineNumber":67,"sourceCode":"\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(s -> s.trim()).collect(Collectors.toSet()));\n        }\n\n        try {\n            final QuarkusCommandOutcome outcome = new RemoveExtensions(quarkusProject)\n                    .extensions(ext.stream().map(String::trim).collect(Collectors.toSet()))\n                    .execute();\n            if (!outcome.isSuccess()) {\n                throw new MojoExecutionException(\"Unable to remove extensions\");\n            }\n        } catch (Exception e) {\n            throw new MojoExecutionException(\"Unable to update the pom.xml file\", e);\n        }\n    }\n}\n","sourceCodeStart":49,"sourceCodeEnd":71,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/RemoveExtensionMojo.java#L49-L71","documentation":"RemoveExtensionMojo.doExecute wraps the whole RemoveExtensions invocation in a try/catch(Exception) and rethrows any thrown exception as MojoExecutionException 'Unable to update the pom.xml file'. This indicates the removal command crashed (rather than returning an unsuccessful outcome) — typically an I/O or model error while reading/rewriting pom.xml.","triggerScenarios":"Any exception thrown inside new RemoveExtensions(...).execute(): IOException writing the pom, Maven model reading errors, concurrent modification/locking of pom.xml, or invalid project model passed via quarkusProject.","commonSituations":"pom.xml is read-only or locked by another process (IDE, git operation); malformed pom.xml XML; running the mojo in a multi-module setup where the targeted module cannot be resolved; disk full.","solutions":["Check the 'Caused by' of this exception for the root cause","Confirm pom.xml is writable and valid XML (mvn validate)","Close IDE locks/git operations on pom.xml and retry","Run `mvn quarkus:remove-extension` from the module directory rather than an unrelated aggregator if module resolution is the issue"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Ensure pom is writable and well-formed before running:\nmvn validate && test -w pom.xml && echo writable","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) {\n  Throwable root = e;\n  while (root.getCause() != null) root = root.getCause();\n  log.error(\"pom update failed, root cause: {}\", root.getMessage(), root);\n}","preventionTips":["Don't run the mojo while the pom is open with unsaved IDE edits or held by git operations","Keep pom.xml XML valid (run mvn validate regularly)","Run dev-mode goals from a workspace with normal file permissions","Commit before running so any partial pom rewrite is recoverable"],"tags":["maven","quarkus","pom"],"backgroundTag":"pom-write-failure","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}