quarkusio/quarkus · error · DeploymentInjectionException

Failed to resolve descriptor for

Error message

Failed to resolve descriptor for 

What it means

Thrown as a DeploymentInjectionException by visitExtensionDependency (within the tree-walking flow exposed publicly by the resolver) when resolving the quarkus-extension descriptor (via MavenArtifactResolver.resolveDescriptor, i.e. reading the artifact's POM/effective model) fails with a BootstrapMavenException. The message includes the artifact that could not be described.

Source

Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyTreeResolver.java:674

        final ResolvedDependencyBuilder dep = appBuilder.getDependency(getKey(node.getArtifact()));
        if (dep != null) {
            dep.clearFlag(DependencyFlags.RELOADABLE);
        }
    }

    private DependencyNode collectDependencies(Artifact artifact, Collection<Exclusion> exclusions,
            List<RemoteRepository> repos) {
        final CollectRequest request;
        if (managedDeps.isEmpty()) {
            request = new CollectRequest()
                    .setRoot(new Dependency(artifact, JavaScopes.COMPILE, false, exclusions))
                    .setRepositories(repos);
        } else {
            final ArtifactDescriptorResult descr;
            try {
                descr = resolver.resolveDescriptor(artifact, repos);
            } catch (BootstrapMavenException e) {
                throw new DeploymentInjectionException("Failed to resolve descriptor for " + artifact, e);
            }
            final Map<ArtifactKey, Dependency> effectiveManagedMap;
            final List<Dependency> effectiveManagedDeps;
            if (descr.getManagedDependencies().isEmpty()) {
                effectiveManagedMap = managedDeps;
                effectiveManagedDeps = new ArrayList<>(managedDeps.values());
            } else {
                effectiveManagedMap = new HashMap<>(managedDeps);
                DependencyUtils.putAll(effectiveManagedMap, descr.getManagedDependencies());
                effectiveManagedDeps = new ArrayList<>(effectiveManagedMap.values());
            }

            var directDeps = DependencyUtils.mergeDependencies(List.of(), descr.getDependencies(), effectiveManagedMap,
                    Set.of(JavaScopes.PROVIDED, JavaScopes.TEST));

            request = new CollectRequest()
                    .setDependencies(directDeps)
                    .setManagedDependencies(effectiveManagedDeps)

View on GitHub (pinned to e1c734241f)

Solutions

  1. Check the cause (BootstrapMavenException) for the exact POM that failed and from which repositories
  2. Verify the POM exists in the repositories; if corrupt locally, delete the artifact dir under ~/.m2/repository and re-resolve
  3. Fix repository configuration (auth, mirror, proxy) or add the missing repository
  4. For locally built extensions, run mvn install so both JAR and POM are in the local repo

Example fix

// fix a corrupt local entry
rm -rf ~/.m2/repository/com/acme/acme-quarkus-extension/1.0.0
./mvnw -U quarkus:dev
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify the POM is retrievable before resolution
boolean pomAvailable(String groupId, String artifactId, String version) {
    return runMaven("dependency:get -Dartifact=" + groupId + ":" + artifactId + ":" + version + ":pom") == 0;
}

Try / catch

try {
    model = resolver.resolve();
} catch (DeploymentInjectionException e) {
    if (e.getMessage().startsWith("Failed to resolve descriptor for")) {
        log.error("Cannot read POM/descriptor; check repos and local .m2: " + e.getCause(), e);
    }
    throw e;
}

Prevention

When it happens

Trigger: While walking a runtime extension dependency, resolver.resolveDescriptor(artifact, repos) cannot download or read the artifact's POM — missing POM in repos, corrupt local repo, or repository access error.

Common situations: JAR present in repo but POM missing; corrupt ~/.m2 entry; auth/proxy blocking the repository hosting the POM; offline mode with incomplete local repo.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/3e0fc09b6218f982. Report an issue: GitHub.