{"record":{"id":"a002c777a43509ad","repo":"quarkusio/quarkus","slug":"failed-to-resolve","errorCode":null,"errorMessage":"Failed to resolve ","messagePattern":"Failed to resolve ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/DefaultEffectiveModelResolver.java","lineNumber":77,"sourceCode":"        }\n\n        final LocalWorkspace ws = resolver.getMavenContext().getWorkspace();\n        if (ws != null) {\n            final LocalProject project = ws.getProject(coords.getGroupId(), coords.getArtifactId());\n            if (project != null && coords.getVersion().equals(project.getVersion())\n                    && project.getEffectiveModel() != null) {\n                return project.getEffectiveModel();\n            }\n        }\n\n        final File pomFile;\n        final ArtifactResult pomResult;\n        try {\n            pomResult = resolver.resolve(new DefaultArtifact(coords.getGroupId(), coords.getArtifactId(),\n                    coords.getClassifier(), coords.getType(), coords.getVersion()), repos);\n            pomFile = pomResult.getArtifact().getFile();\n        } catch (BootstrapMavenException e) {\n            throw new RuntimeException(\"Failed to resolve \" + coords.toCompactCoords(), e);\n        }\n\n        final Model rawModel;\n        try {\n            rawModel = ModelUtils.readModel(pomFile.toPath());\n        } catch (IOException e1) {\n            throw new RuntimeException(\"Failed to read \" + pomFile, e1);\n        }\n\n        final ModelResolver modelResolver;\n        try {\n            modelResolver = BootstrapModelResolver.newInstance(resolver.getMavenContext(), null);\n        } catch (BootstrapMavenException e) {\n            throw new RuntimeException(\"Failed to initialize model resolver\", e);\n        }\n\n        // override the relative path to the parent in case it's in the local Maven repo\n        Parent parent = rawModel.getParent();","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/DefaultEffectiveModelResolver.java#L59-L95","documentation":"Thrown when the underlying Maven resolver cannot download/locate the POM artifact for the requested coordinates (ArtifactCoords). The coordinates are appended to the message and the original BootstrapMavenException is the cause.","triggerScenarios":"resolveEffectiveModel(ArtifactCoords, repos) calling resolver.resolve(DefaultArtifact...) when the artifact does not exist in any configured repository, credentials are wrong, or the network is unavailable.","commonSituations":"Typo'd groupId/artifactId/version, artifact only in a private repo that isn't configured, missing repository credentials in settings.xml, offline/VPN issues, snapshot artifacts purged from remote.","solutions":["Verify the coordinates (groupId:artifactId:version) actually exist — check with 'mvn dependency:get -Dartifact=g:a:v'","Add the required repository (and credentials in settings.xml) to the resolver configuration","Check network/proxy/VPN connectivity and proxy settings in settings.xml","Clear a corrupt cached entry in ~/.m2/repository for that artifact and retry"],"exampleFix":"// before\nresolver.resolve(new DefaultArtifact(\"com.acme\", \"missing-app\", null, \"jar\", \"1.0.0\"), repos);\n// after: correct coordinates + repository\nrepos = List.of(new RemoteRepository.Builder(\"acme\", \"default\", \"https://repo.acme.com/maven2\").build());\nresolver.resolve(new DefaultArtifact(\"com.acme\", \"missing-app\", null, \"jar\", \"1.0.1\"), repos);","handlingStrategy":"try-catch","validationCode":"// probe artifact existence first\ntry {\n    resolver.resolve(new DefaultArtifact(g, a, c, type, v), repos);\n} catch (BootstrapMavenException e) {\n    throw new IllegalStateException(\"Artifact \" + g + \":\" + a + \":\" + v + \" unavailable; check repos/credentials\", e);\n}","typeGuard":null,"tryCatchPattern":"try {\n    Model m = modelResolver.resolveEffectiveModel(coords);\n} catch (RuntimeException e) {\n    if (e.getCause() instanceof BootstrapMavenException) {\n        logger.error(\"Cannot resolve \" + coords.toCompactCoords() + \": verify coordinates, repositories, network\", e);\n    }\n    throw e;\n}","preventionTips":["Verify coordinates with mvn dependency:get before programmatic resolution","Configure all required repositories and credentials in settings.xml","Check proxy/VPN settings when resolving from private repos"],"tags":["maven","artifact-resolution","network"],"backgroundTag":"artifact-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}