{"record":{"id":"4a9bfbed25d88f6f","repo":"quarkusio/quarkus","slug":"failed-to-initialize-maven-artifact-resolver-4a9bfb","errorCode":null,"errorMessage":"Failed to initialize Maven artifact resolver","messagePattern":"Failed to initialize Maven artifact resolver","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/MavenProjectBuildFile.java","lineNumber":153,"sourceCode":"        if (projectProps.containsKey(\"maven.compiler.target\")) {\n            return new JavaVersion(projectProps.getProperty(\"maven.compiler.target\"));\n        }\n        if (projectProps.containsKey(\"maven.compiler.source\")) {\n            return new JavaVersion(projectProps.getProperty(\"maven.compiler.source\"));\n        }\n        return JavaVersion.NA;\n    }\n\n    private static MavenArtifactResolver getMavenResolver(Path projectDir) {\n        final RegistriesConfig toolsConfig = QuarkusProjectHelper.toolsConfig();\n        try {\n            return MavenArtifactResolver.builder()\n                    .setArtifactTransferLogging(toolsConfig.isDebug())\n                    .setCurrentProject(projectDir.toAbsolutePath().toString())\n                    .setPreferPomsFromWorkspace(true)\n                    .build();\n        } catch (BootstrapMavenException e) {\n            throw new RuntimeException(\"Failed to initialize Maven artifact resolver\", e);\n        }\n    }\n\n    private static String getQuarkusVersion(List<ArtifactCoords> managedDeps) {\n        for (ArtifactCoords a : managedDeps) {\n            if (a.getArtifactId().endsWith(\"quarkus-core\") && a.getGroupId().equals(\"io.quarkus\")) {\n                return a.getVersion();\n            }\n        }\n        return null;\n    }\n\n    private static List<ArtifactCoords> toArtifactCoords(List<org.eclipse.aether.graph.Dependency> deps) {\n        final List<ArtifactCoords> result = new ArrayList<>(deps.size());\n        for (org.eclipse.aether.graph.Dependency dep : deps) {\n            org.eclipse.aether.artifact.Artifact a = dep.getArtifact();\n            result.add(ArtifactCoords.of(a.getGroupId(), a.getArtifactId(), a.getClassifier(),\n                    a.getExtension(), a.getVersion()));","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/MavenProjectBuildFile.java#L135-L171","documentation":"RuntimeException from MavenProjectBuildFile.getMavenResolver: the Maven artifact resolver for the devtools project could not be constructed — the bootstrap Maven context failed to initialize (settings problems, no local repo, unreachable configuration). It is a wrapper around the underlying BootstrapMavenException; the input at fault is the project directory / Maven environment of the inspected project.","triggerScenarios":"Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/MavenProjectBuildFile.java:153 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the caused-by BootstrapMavenException for the root cause (settings, local repo, offline mode)","Verify the target project directory contains a valid pom.xml","Check ~/.m2/settings.xml validity and repository reachability"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}