quarkusio/quarkus · error · BootstrapDependencyProcessingException
Failed to initialize deployment dependencies resolver
Error message
Failed to initialize deployment dependencies resolver
What it means
During resolve(), ApplicationDependencyTreeResolver builds a new MavenArtifactResolver with a custom DeploymentDependencySelector (so optional deployment-only dependencies are included). Constructing BootstrapMavenContext/MavenArtifactResolver can fail (bad local repo path, invalid settings.xml, unresolvable repository manager config); the BootstrapMavenException is wrapped in this BootstrapDependencyProcessingException.
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyTreeResolver.java:207
setWalkingFlag(COLLECT_RELOADABLE_MODULES);
}
// we need to be able to take into account whether the deployment dependencies are on an optional dependency branch
// for that we are going to use a custom dependency selector and re-initialize the resolver to use it
final MavenArtifactResolver originalResolver = resolver;
final RepositorySystemSession originalSession = resolver.getSession();
final DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(originalSession);
session.setDependencySelector(
DeploymentDependencySelector.ensureDeploymentDependencySelector(session.getDependencySelector()));
try {
this.resolver = new MavenArtifactResolver(new BootstrapMavenContext(BootstrapMavenContext.config()
.setRepositorySystem(resolver.getSystem())
.setRepositorySystemSession(session)
.setRemoteRepositories(resolver.getRepositories())
.setRemoteRepositoryManager(resolver.getRemoteRepositoryManager())
.setCurrentProject(resolver.getMavenContext().getCurrentProject())
.setWorkspaceDiscovery(false)));
} catch (BootstrapMavenException e) {
throw new BootstrapDependencyProcessingException("Failed to initialize deployment dependencies resolver",
e);
}
visitRuntimeDependencies(root.getChildren());
enableConditionalDeps();
if (!runtimeModelOnly) {
for (ExtensionDependency extDep : deploymentInjectionPoints) {
injectDeploymentDependencies(extDep);
}
}
root = normalize(originalSession, root);
// add deployment dependencies
new BuildDependencyGraphVisitor(originalResolver, appBuilder, buildTreeConsumer).visit(root);
if (!CONVERGED_TREE_ONLY && collectReloadableModules) {
for (ResolvedDependencyBuilder db : appBuilder.getDependencies()) {View on GitHub (pinned to e1c734241f)
Solutions
- Run 'mvn help:effective-settings' to validate settings.xml; fix XML/interpolation errors.
- Check the maven.repo.local path exists and is writable; unset or fix a bad -Dmaven.repo.local value.
- Validate the application pom.xml (mvn validate) — a broken current project model breaks context initialization.
- Test with a clean ~/.m2 (or fresh MAVEN_OPTS) to rule out corrupted local repository metadata.
Example fix
// before: bad local repo path $ mvn quarkus:dev -Dmaven.repo.local=/nonexistent/dir // after: valid writable local repo $ mvn quarkus:dev -Dmaven.repo.local=$HOME/.m2/repository
Defensive patterns
Strategy: validation
Validate before calling
// validate Maven context inputs before launching the build
if (!Files.isWritable(Path.of(localRepoPath)))
throw new IllegalStateException("maven.repo.local not writable: " + localRepoPath);
// and verify settings parse:
new ProcessBuilder("mvn", "help:effective-settings").inheritIO().start().waitFor(); Try / catch
try {
quarkusBuild();
} catch (BootstrapDependencyProcessingException e) {
if (e.getMessage().contains("Failed to initialize deployment dependencies resolver")) {
throw new IllegalStateException("Fix settings.xml / maven.repo.local, cause: " + e.getCause(), e);
}
throw e;
} Prevention
- Keep settings.xml valid and simple; run help:effective-settings after edits.
- Ensure -Dmaven.repo.local points to an existing writable directory.
- Run mvn validate to catch broken project models early.
- Avoid exotic global Maven extension/plexus customizations that break context bootstrapping.
When it happens
Trigger: resolve() at the point of re-initializing this.resolver — new BootstrapMavenContext(config().setRepositorySystem(...).setRepositorySystemSession(...).setRemoteRepositories(...)) throws BootstrapMavenException because the Maven context cannot be initialized (invalid local repository, unreadable/misconfigured settings.xml, bad current project model).
Common situations: Corrupt or invalid ~/.m2/settings.xml (XML errors, unresolvable variable interpolation); -Dmaven.repo.local pointing to an unwritable/nonexistent path; Maven project model errors in the current project (pom.xml problems) when running via the Quarkus Maven plugin; exotic Maven installations.
Related errors
- Unsupported format: ${format}
- Either the `extension` or `extensions` parameter must be set
- Cannot specify both class and method name
- The project artifact's extension is '${extension}' while thi
- Specifying a stream requires the Quarkus extension registry
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/ee0065749ccb7b0f.
Report an issue: GitHub.