quarkusio/quarkus · error · MojoExecutionException
Failed to apply the updates: ${result.getMessage()}
Error message
Failed to apply the updates: ${result.getMessage()} What it means
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).
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/UpdateMojo.java:150
}
if (rewriteAdditionalUpdateRecipes != null) {
invoker.rewriteAdditionalUpdateRecipes(rewriteAdditionalUpdateRecipes);
}
invoker.rewriteDryRun(rewriteDryRun);
// backward compat
if (noRewrite != null && noRewrite) {
rewrite = false;
}
if (rewrite != null) {
invoker.rewrite(rewrite);
}
try {
final QuarkusCommandOutcome result = invoker.execute();
if (!result.isSuccess()) {
throw new MojoExecutionException(
"Failed to apply the updates: " + result.getMessage());
}
} catch (QuarkusUpdateExitErrorException e) {
throw new MojoExecutionException(e.getMessage());
} catch (QuarkusCommandException e) {
throw new MojoExecutionException("Failed to apply the updates", e);
}
}
private static ArtifactCoords getPrimaryBom(ExtensionCatalog c) {
return c.getDerivedFrom().isEmpty() ? c.getBom() : c.getDerivedFrom().get(0).getBom();
}
}
View on GitHub (pinned to e1c734241f)
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
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check before quarkus:update: git status --porcelain # must be clean grep -A1 'quarkus.platform' pom.xml # project should use a platform BOM
Try / catch
catch (MojoExecutionException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Failed to apply the updates:")) {
log.error("Update refused: {}", e.getMessage()); // includes the command's own reason
} else throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- ${e.getMessage()}
- Failed to apply the updates
- Unable to parse pom file: ${pom}
- Could not resolve POM for
- Failed to log the dependency tree to a file
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/71fd92e729c2f680.
Report an issue: GitHub.