{"record":{"id":"1c6a274dc78a17d5","repo":"quarkusio/quarkus","slug":"failed-to-resolve-descriptor-for-artifact","errorCode":null,"errorMessage":"Failed to resolve descriptor for ${artifact}","messagePattern":"Failed to resolve descriptor for (.+?)","errorType":"exception","errorClass":"DeploymentInjectionException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java","lineNumber":925,"sourceCode":"            root = resolver.getSystem()\n                    .collectDependencies(resolver.getSession(), collectRequest)\n                    .getRoot();\n        } catch (DependencyCollectionException e) {\n            throw new DeploymentInjectionException(\"Failed to collect dependencies for \" + artifact, e);\n        }\n        if (root.getChildren().size() != 1) {\n            throw new DeploymentInjectionException(\"Only one child expected but got \" + root.getChildren());\n        }\n        return root.getChildren().get(0);\n    }\n\n    private CollectRequest getCollectRequest(Artifact artifact, Collection<Exclusion> exclusions,\n            List<RemoteRepository> repos) {\n        final ArtifactDescriptorResult descr;\n        try {\n            descr = resolver.resolveDescriptor(artifact, repos);\n        } catch (BootstrapMavenException e) {\n            throw new DeploymentInjectionException(\"Failed to resolve descriptor for \" + artifact, e);\n        }\n        final List<Dependency> effectiveConstraints;\n        if (descr.getManagedDependencies().isEmpty()) {\n            effectiveConstraints = new ArrayList<>(managedDeps.values());\n        } else {\n            final Map<ArtifactKey, Dependency> effecctiveMap = new HashMap<>(managedDeps);\n            DependencyUtils.putAll(effecctiveMap, descr.getManagedDependencies());\n            effectiveConstraints = new ArrayList<>(effecctiveMap.values());\n        }\n        return new CollectRequest()\n                .setManagedDependencies(effectiveConstraints)\n                .setRepositories(repos)\n                // formal root artifact\n                .setRootArtifact(new DefaultArtifact(\"io.quarkus\", \"quarkus-root-artifact\", ArtifactCoords.TYPE_JAR, \"1.0\"))\n                .setDependencies(List.of(new Dependency(artifact, JavaScopes.COMPILE, false, exclusions)));\n    }\n\n    private Artifact resolve(Artifact artifact, List<RemoteRepository> repos) {","sourceCodeStart":907,"sourceCodeEnd":943,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java#L907-L943","documentation":"Thrown when resolver.resolveDescriptor() fails to fetch and parse the effective POM (artifact descriptor) for the target artifact while building a CollectRequest in getCollectRequest(). Quarkus needs the descriptor to merge its managed dependencies with the platform's dependencyManagement before collecting the graph. A BootstrapMavenException from descriptor resolution (POM not found, unreadable, or invalid) is rewrapped as this DeploymentInjectionException.","triggerScenarios":"ApplicationDependencyResolver.getCollectRequest(artifact, exclusions, repos) calls resolver.resolveDescriptor(artifact, repos) and the artifact's POM cannot be downloaded from the given repositories, does not exist at the coordinates, or is malformed XML.","commonSituations":"Typo in groupId:artifactId:version of an extension; artifact exists only in a repository not configured in settings.xml; partial download left an invalid POM in ~/.m2; a snapshot repository missing for a -SNAPSHOT version; POM parse failure due to unsupported features (e.g. exotic plugins in the POM build section).","solutions":["Verify the exact coordinates exist: 'mvn dependency:get -Dartifact=g:a:v' — fix typos or wrong versions in the dependency declaration.","Add the missing repository (settings.xml <repositories> or quarkus.maven.repo-local / quarkus repositories config) that hosts the artifact.","Delete the artifact's directory under ~/.m2/repository and retry with -U to replace a corrupt POM.","If it's a SNAPSHOT, confirm the snapshot repository is enabled with updatePolicy allowing re-resolution."],"exampleFix":"// before: quarkus arguments pointing to an extension not in any configured repo\nquarkus.args.\"--additional-extension\"=\"com.acme:quarkus-acme:1.0\"\n// after: declare the repo in settings.xml so the descriptor can be resolved\n<settings>\n  <profiles>\n    <profile>\n      <repositories>\n        <repository>\n          <id>acme</id>\n          <url>https://nexus.acme.com/repository/maven-releases/</url>\n        </repository>\n      </repositories>\n    </profile>\n  </profiles>\n</settings>","handlingStrategy":"validation","validationCode":"import static java.nio.file.Files.isReadable;\n// sanity-check coordinates before passing to bootstrap APIs\nstatic void validateCoords(String g, String a, String v) {\n    if (g == null || g.isBlank() || a == null || a.isBlank() || v == null || v.isBlank())\n        throw new IllegalArgumentException(\"incomplete coordinates: \" + g + \":\" + a + \":\" + v);\n}","typeGuard":null,"tryCatchPattern":"try {\n    resolver.resolve(descriptorRequest);\n} catch (BootstrapMavenException e) {\n    throw new IllegalStateException(\n        \"Descriptor for \" + artifact + \" unresolvable; check repo config and coordinates\", e);\n}","preventionTips":["Verify extension coordinates with 'mvn dependency:get' before referencing them in quarkus configuration.","Keep settings.xml repositories aligned with where your extensions are published.","Enable SNAPSHOT repositories explicitly when using snapshot extension versions.","Avoid hand-editing cached POMs in the local repository."],"tags":["maven","pom","artifact-descriptor"],"backgroundTag":"artifact-descriptor-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"}