{"record":{"id":"404eef8c22ed0690","repo":"quarkusio/quarkus","slug":"failed-to-resolve-artifact-404eef","errorCode":null,"errorMessage":"Failed to resolve artifact ","messagePattern":"Failed to resolve artifact ","errorType":"exception","errorClass":"DeploymentInjectionException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyTreeResolver.java","lineNumber":718,"sourceCode":"        try {\n            return resolver.getSystem().collectDependencies(resolver.getSession(), request).getRoot();\n        } catch (DependencyCollectionException e) {\n            throw new DeploymentInjectionException(\"Failed to collect dependencies for \" + artifact, e);\n        }\n    }\n\n    private Artifact resolve(Artifact artifact, List<RemoteRepository> repos) {\n        if (artifact.getFile() != null) {\n            return artifact;\n        }\n        try {\n            return resolver.getSystem().resolveArtifact(resolver.getSession(),\n                    new ArtifactRequest()\n                            .setArtifact(artifact)\n                            .setRepositories(repos))\n                    .getArtifact();\n        } catch (ArtifactResolutionException e) {\n            throw new DeploymentInjectionException(\"Failed to resolve artifact \" + artifact, e);\n        }\n    }\n\n    private void setWalkingFlag(byte flag) {\n        walkingFlags |= flag;\n    }\n\n    private boolean isWalkingFlagOn(byte flag) {\n        return (walkingFlags & flag) == flag;\n    }\n\n    /**\n     * Clears the flags and returns {@code true}, if the flags were actually on and cleared.\n     *\n     * @param flags the flags to clear\n     * @return true if the flags were on and cleared, false if the flags were not on\n     */\n    private boolean clearWalkingFlag(byte flags) {","sourceCodeStart":700,"sourceCodeEnd":736,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyTreeResolver.java#L700-L736","documentation":"Thrown as a DeploymentInjectionException by resolve(Artifact, repos) when Maven Resolver's resolveArtifact call fails with an ArtifactResolutionException, i.e. the artifact file (JAR/POM) itself could not be downloaded from the local or remote repositories.","triggerScenarios":"resolve() is called for deployment/descriptor artifacts during extension injection; the file does not exist in any configured repository, checksums fail, or network/auth prevents download.","commonSituations":"Artifact simply not published (wrong groupId/artifactId/version); private artifact not in the corporate mirror; expired credentials; checksum mismatch from a corrupted download; offline mode.","solutions":["Confirm the exact artifact exists in the target repository by browsing it (groupId/artifactId/version path)","Fix credentials/proxy/mirror settings in settings.xml or bootstrap Maven config","Delete a partially downloaded or checksum-failing entry in ~/.m2/repository and re-resolve with -U","Run 'mvn dependency:get -Dartifact=g:a:v' to test downloadability independently of Quarkus"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Probe artifact downloadability before invoking the resolver\n// mvn dependency:get -Dartifact=com.acme:lib:1.0.0\nboolean artifactExists(java.net.URL repo, String groupPath, String artifactId, String version, String ext) {\n    try (var conn = (java.net.HttpURLConnection) java.net.URI.create(\n            repo + groupPath + \"/\" + artifactId + \"/\" + version + \"/\" + artifactId + \"-\" + version + \".\" + ext)\n            .toURL().openConnection()) {\n        return conn.getResponseCode() == 200;\n    } catch (IOException e) { return false; }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify artifact coordinates against the repository browser before adding dependencies","Keep credentials/mirrors in settings.xml current","Retry with -U after fixing transient network/checksum failures","For air-gapped builds, pre-populate the local repository and use offline mode"],"tags":["maven","artifact-download","network"],"backgroundTag":"artifact-not-found-in-repository","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"}