{"record":{"id":"71fd92e729c2f680","repo":"quarkusio/quarkus","slug":"failed-to-apply-the-updates-result-getmessage","errorCode":null,"errorMessage":"Failed to apply the updates: ${result.getMessage()}","messagePattern":"Failed to apply the updates: (.+?)","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/UpdateMojo.java","lineNumber":150,"sourceCode":"        }\n        if (rewriteAdditionalUpdateRecipes != null) {\n            invoker.rewriteAdditionalUpdateRecipes(rewriteAdditionalUpdateRecipes);\n        }\n        invoker.rewriteDryRun(rewriteDryRun);\n\n        // backward compat\n        if (noRewrite != null && noRewrite) {\n            rewrite = false;\n        }\n\n        if (rewrite != null) {\n            invoker.rewrite(rewrite);\n        }\n\n        try {\n            final QuarkusCommandOutcome result = invoker.execute();\n            if (!result.isSuccess()) {\n                throw new MojoExecutionException(\n                        \"Failed to apply the updates: \" + result.getMessage());\n            }\n        } catch (QuarkusUpdateExitErrorException e) {\n            throw new MojoExecutionException(e.getMessage());\n        } catch (QuarkusCommandException e) {\n            throw new MojoExecutionException(\"Failed to apply the updates\", e);\n        }\n    }\n\n    private static ArtifactCoords getPrimaryBom(ExtensionCatalog c) {\n        return c.getDerivedFrom().isEmpty() ? c.getBom() : c.getDerivedFrom().get(0).getBom();\n    }\n}\n","sourceCodeStart":132,"sourceCodeEnd":164,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/UpdateMojo.java#L132-L164","documentation":"UpdateMojo.processProjectState executes the UpdateProject command; when the command completes but reports isSuccess()==false, the mojo throws MojoExecutionException 'Failed to apply the updates: <result message>'. The appended result.getMessage() carries the command's own failure explanation (e.g. a conflict or an aborted rewrite).","triggerScenarios":"invoker.execute() returns an unsuccessful outcome: the update rewrite could not be applied — e.g. project depends on a pre-release/non-platform version with no recommended migration path, or the update command hit a state it refused to rewrite.","commonSituations":"Updating a project not aligned to a Quarkus platform BOM; very old Quarkus versions with breaking relocation; uncommitted local changes to generated files conflicting with the update; running quarkus:update on a non-Quarkus project.","solutions":["Read the appended result message for the specific refusal reason","Commit or stash local changes before running quarkus:update, then retry","Run `mvn quarkus:update` after aligning the project to a platform BOM (quarkus.platform.version)","Fall back to a manual upgrade: change quarkus.platform.version in the pom and run `mvn quarkus:update` compatible steps or handle conflicts manually"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-check before quarkus:update:\ngit status --porcelain  # must be clean\ngrep -A1 'quarkus.platform' pom.xml  # project should use a platform BOM","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Failed to apply the updates:\")) {\n    log.error(\"Update refused: {}\", e.getMessage()); // includes the command's own reason\n  } else throw e;\n}","preventionTips":["Keep the project aligned to a Quarkus platform BOM before updating","Commit or stash local modifications so rewrites don't conflict","Run updates on a clean checkout of the branch","Read the message appended after the colon — it states the exact refusal reason"],"tags":["maven","quarkus","upgrade"],"backgroundTag":"update-apply-failed","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"}