quarkusio/quarkus · error · MojoExecutionException
Failed to apply the updates
Error message
Failed to apply the updates
What it means
The final catch in UpdateMojo.processProjectState wraps any QuarkusCommandException from invoker.execute() as MojoExecutionException 'Failed to apply the updates' with the original exception attached as cause. This is the generic wrapper: the update command itself threw an unexpected exception rather than returning a failed outcome.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/UpdateMojo.java:156
// 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
- Inspect the cause chain of this MojoExecutionException for the underlying QuarkusCommandException
- Check that build files (pom.xml / build.gradle) are valid, writable, and not locked
- Commit or back up the project, then re-run `mvn quarkus:update` on a clean state
- As a last resort upgrade manually: bump quarkus.platform.version and follow the migration guide for the target version
Example fix
// manual fallback <!-- before --> <quarkus.platform.version>2.16.0.Final</quarkus.platform.version> <!-- after --> <quarkus.platform.version>3.15.1</quarkus.platform.version>
Defensive patterns
Strategy: try-catch
Validate before calling
// Ensure build files are valid and writable before updating: mvn validate && test -w pom.xml && echo ok
Try / catch
catch (MojoExecutionException e) {
if ("Failed to apply the updates".equals(e.getMessage()) && e.getCause() instanceof QuarkusCommandException) {
log.error("Update command crashed; cause:", e.getCause());
} else throw e;
} Prevention
- Validate and commit build files before running quarkus:update
- Keep the project layout conventional (standard pom/gradle structure)
- Run on a clean CI-like environment to avoid transient IO issues
- Fall back to manual platform-version bumps plus the migration guide for exotic projects
When it happens
Trigger: QuarkusCommandException thrown by UpdateProject.execute(): internal command errors such as IO problems rewriting build files, model resolution failures mid-rewrite, or command framework errors — anything that surfaces as QuarkusCommandException instead of a clean isSuccess()==false outcome.
Common situations: Filesystem permission problems while rewriting pom.xml/build.gradle; malformed build files that parse initially but fail on rewrite; transient IO errors; bugs in update recipes for exotic project layouts.
Related errors
- Failed to apply the updates: ${result.getMessage()}
- ${e.getMessage()}
- 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/bad134fe52065e49.
Report an issue: GitHub.