quarkusio/quarkus · error · RuntimeException

Failed to collect dependencies of

Error message

Failed to collect dependencies of 

What it means

After collecting the dependency graph of a deployment artifact, Quarkus expects it to have at least one child — at minimum the dependency on the corresponding runtime artifact. If the collected graph has no children, this RuntimeException explains either the deployment POM could not be resolved from available repositories, or the deployment artifact declares no dependencies at all (violating the requirement that a deployment module depends on its runtime module).

Source

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

                node.setData(QUARKUS_EXTENSION_DEPENDENCY, this);
            } else if (data.put(QUARKUS_EXTENSION_DEPENDENCY, this) != null) {
                throw new IllegalStateException(
                        "Dependency node " + node + " has already been associated with an extension dependency");
            }
        }

        void addExtensionDependency(ExtensionDependency dep) {
            if (extDeps == null) {
                extDeps = new ArrayList<>();
            }
            extDeps.add(dep);
        }

        private void collectDeploymentDeps() {
            log.debugf("Collecting dependencies of %s", info.deploymentArtifact);
            deploymentNode = collectDependencies(info.deploymentArtifact, exclusions, runtimeNode.getRepositories());
            if (deploymentNode.getChildren().isEmpty()) {
                throw new RuntimeException(
                        "Failed to collect dependencies of " + deploymentNode.getArtifact()
                                + ": either its POM could not be resolved from the available Maven repositories "
                                + "or the artifact does not have any dependencies while at least a dependency on the runtime artifact "
                                + info.runtimeArtifact + " is expected");
            }
            ensureScopeAndOptionality(deploymentNode, runtimeNode.getDependency().getScope(),
                    runtimeNode.getDependency().isOptional());

            replaceRuntimeExtensionNodes(deploymentNode);
            if (!presentInTargetGraph) {
                throw new RuntimeException(
                        "Quarkus extension deployment artifact " + deploymentNode.getArtifact()
                                + " does not appear to depend on the corresponding runtime artifact "
                                + info.runtimeArtifact);
            }
        }

        private void injectDeploymentDependency(AppDep parent) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Open the deployment artifact's POM and ensure it declares a dependency on the corresponding runtime artifact (io.quarkus:quarkus-<ext> or your custom equivalent).
  2. Verify the deployment POM and all its parent/transitive POMs are downloadable from the configured repositories (mvn dependency:tree on the deployment artifact).
  3. Delete the cached deployment artifact in ~/.m2/repository and re-resolve with -U in case of corruption.
  4. Re-generate the extension with the Quarkus extension-maven-plugin so the runtime/deployment module structure is correct.

Example fix

<!-- before: deployment POM with no dependencies -->
<artifactId>myext-deployment</artifactId>
<!-- after: deployment POM depends on runtime module -->
<artifactId>myext-deployment</artifactId>
<dependencies>
  <dependency>
    <groupId>com.acme</groupId>
    <artifactId>myext</artifactId>
    <version>${project.version}</version>
  </dependency>
</dependencies>
Defensive patterns

Strategy: validation

Validate before calling

// for custom extensions, assert the deployment POM lists the runtime artifact
Document pom = loadPom("myext-deployment/pom.xml");
NodeList deps = (NodeList) xpath.evaluate(
    "/project/dependencies/dependency[artifactId='myext']", pom, XPathConstants.NODESET);
if (deps.getLength() == 0)
    throw new IllegalStateException("deployment POM must depend on runtime artifact 'myext'");

Prevention

When it happens

Trigger: ExtensionDependency.collectDeploymentDeps() calls collectDependencies(info.deploymentArtifact, ...) and the resulting deploymentNode has zero children — deployment POM unresolvable (silently yielding an empty graph) or a hand-written deployment POM with no <dependencies> entry on the runtime artifact.

Common situations: Custom/in-house Quarkus extension where the -deployment POM forgot the dependency on the runtime artifact; a deployment POM published to a repo where its transitive POMs 404; incorrectly generated extension skeleton missing the runtime dependency.

Related errors


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