quarkusio/quarkus · error · MojoExecutionException
${e.getMessage()}
Error message
${e.getMessage()} What it means
When the update command throws QuarkusUpdateExitErrorException (the command explicitly exited with an error, e.g. an embedded interactive updater like an SQL/JBang migration script requested an exit-with-error), UpdateMojo rethrows MojoExecutionException with just e.getMessage(). The message is whatever the update tooling put on the exception — it is deliberately surfaced verbatim.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/UpdateMojo.java:154
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 propagated e.getMessage() — it is the update tool's own error text
- Re-run quarkus:update interactively (attached terminal) so prompts in migration scripts can be answered
- Run the failing migration step manually, then retry quarkus:update
- Skip scripted migration by updating quarkus.platform.version manually and handle code changes yourself
Defensive patterns
Strategy: try-catch
Validate before calling
// Run non-interactive migration steps in a probe first: mvn quarkus:update -DdryRun # if supported, to surface script errors before applying
Try / catch
catch (MojoExecutionException e) {
if (e.getMessage() == null || e.getMessage().isEmpty()) {
log.error("Update script exited with error and no message; rerun with -X for details");
} else {
log.error("Migration tool error: {}", e.getMessage());
}
} Prevention
- Run quarkus:update in an attached interactive terminal so scripts can prompt
- Test updates on a branch; commit before applying
- Perform scripted migrations as separate documented steps when CI is non-interactive
- Keep migration tooling versions in sync with the target Quarkus version
When it happens
Trigger: invoker.execute() throws QuarkusUpdateExitErrorException during processProjectState: the update command ran a step (often an external migration script) that terminated with a non-zero exit code, signalling the update must be aborted.
Common situations: Migration scripts invoked by quarkus:update failing (e.g. deprecated-API migration tool errors); script requires user input but runs non-interactively; platform-provided update scripts incompatible with the project state.
Related errors
- Failed to apply the updates: ${result.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/5c4eb08c9383bc37.
Report an issue: GitHub.