{"record":{"id":"19ecffc816f53f30","repo":"quarkusio/quarkus","slug":"failed-to-resolve-dependencies-for","errorCode":null,"errorMessage":"Failed to resolve dependencies for ","messagePattern":"Failed to resolve dependencies for ","errorType":"exception","errorClass":"BootstrapMavenException","httpStatus":null,"severity":"critical","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyTreeResolver.java","lineNumber":426,"sourceCode":"                    }\n                    final Set<ArtifactKey> deps = artifactDeps\n                            .computeIfAbsent(DependencyUtils.getCoords(node.getArtifact()),\n                                    k -> new HashSet<>(node.getChildren().size()));\n                    for (DependencyNode c : node.getChildren()) {\n                        deps.add(getKey(c.getArtifact()));\n                        walk(c, visited);\n                    }\n                }\n            });\n            session = mutableSession;\n        }\n        try {\n            return resolver.getSystem().resolveDependencies(session,\n                    new DependencyRequest().setCollectRequest(request))\n                    .getRoot();\n        } catch (DependencyResolutionException e) {\n            final Artifact a = request.getRoot() == null ? request.getRootArtifact() : request.getRoot().getArtifact();\n            throw new BootstrapMavenException(\"Failed to resolve dependencies for \" + a, e);\n        }\n    }\n\n    private boolean isRuntimeArtifact(ArtifactKey key) {\n        final ResolvedDependencyBuilder dep = appBuilder.getDependency(key);\n        return dep != null && dep.isFlagSet(DependencyFlags.RUNTIME_CP);\n    }\n\n    private void visitRuntimeDependencies(List<DependencyNode> list) {\n        for (DependencyNode n : list) {\n            visitRuntimeDependency(n);\n        }\n    }\n\n    private void visitRuntimeDependency(DependencyNode node) {\n\n        final byte prevWalkingFlags = walkingFlags;\n","sourceCodeStart":408,"sourceCodeEnd":444,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyTreeResolver.java#L408-L444","documentation":"Thrown as a BootstrapMavenException by resolveRuntimeDeps when Maven Resolver's resolveDependencies call fails with a DependencyResolutionException while resolving the application's runtime dependency tree. The root artifact that could not be resolved is included in the message; the cause chain contains Maven's per-artifact failure details (missing artifacts, repository errors, conflicts).","triggerScenarios":"Calling ApplicationDependencyTreeResolver.resolve() when a runtime dependency (transitively included) cannot be downloaded from configured repositories, a dependency POM/JAR is missing or corrupted in the local repo, or repository access fails (offline, auth, network).","commonSituations":"Corporate proxy/firewall blocking repo access; typo'd or unpublished version (e.g. SNAPSHOT purged); missing repository declaration for a private artifact; corrupt ~/.m2/repository entries; using quarkus.bootstrap.offline without a pre-populated local repo.","solutions":["Read the cause chain to find the exact missing/unresolvable artifact, then run 'mvn dependency:resolve -U' in the project to confirm and refresh","Check the artifact version exists in the repositories (typos, removed SNAPSHOTs); pin a released version or deploy the artifact","Verify repositories are reachable: check settings.xml mirrors/auth, corporate proxy, or add the missing <repository> to the POM or quarkus bootstrap config","If the local repo copy is corrupt, delete the artifact's directory under ~/.m2/repository and re-resolve","If network is unavailable intentionally, run with offline mode and ensure all artifacts are pre-populated"],"exampleFix":"// before: unresolvable version\n<dependency>\n  <groupId>com.acme</groupId>\n  <artifactId>lib</artifactId>\n  <version>2.0.0-SNAPSHOT</version>\n</dependency>\n// after: pin an existing released version\n<version>1.9.3</version>","handlingStrategy":"try-catch","validationCode":"// Pre-check resolvability with plain Maven before running the app\n// mvn -U dependency:resolve  (or dependency:get -Dartifact=g:a:v)\n// Also verify offline artifacts exist:\nimport java.nio.file.*;\nboolean inLocalRepo(String groupId, String artifactId, String version, String ext) {\n    Path p = Path.of(System.getProperty(\"user.home\"), \".m2\", \"repository\",\n        groupId.replace('.', '/'), artifactId, version, artifactId + \"-\" + version + \".\" + ext);\n    return Files.exists(p);\n}","typeGuard":null,"tryCatchPattern":"try {\n    appModel = resolver.resolve();\n} catch (BootstrapMavenException e) {\n    // inspect e.getCause() (DependencyResolutionException) for the exact missing artifact\n    log.error(\"Unresolvable runtime dependencies; check repos/settings.xml: \" + e.getCause(), e);\n    throw e;\n}","preventionTips":["Run 'mvn dependency:resolve -U' in CI before Quarkus builds","Declare all private repositories and credentials in settings.xml","Avoid depending on SNAPSHOTs that may be purged; pin released versions","Clean corrupt ~/.m2 entries when checksum errors appear"],"tags":["maven","dependency-resolution","build"],"backgroundTag":"maven-dependency-resolution-failure","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"}