quarkusio/quarkus · error · BootstrapDependencyProcessingException

Failed to collect dependencies of

Error message

Failed to collect dependencies of 

What it means

Thrown as a BootstrapDependencyProcessingException by injectDeploymentDependencies when the collected dependency tree for an extension's deployment artifact is empty. Quarkus expects every deployment artifact to depend at least on its corresponding runtime artifact, so an empty tree means the deployment POM could not be resolved or the artifact genuinely has no dependencies.

Source

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

        }
        try {
            final Properties rtProps = new Properties();
            try (BufferedReader reader = Files.newBufferedReader(visit.getPath())) {
                rtProps.load(reader);
            }
            return rtProps;
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }

    private void injectDeploymentDependencies(ExtensionDependency extDep)
            throws BootstrapDependencyProcessingException {
        log.debugf("Injecting deployment dependency %s", extDep.info.deploymentArtifact);
        final DependencyNode deploymentNode = collectDependencies(extDep.info.deploymentArtifact, extDep.exclusions,
                extDep.runtimeNode.getRepositories());
        if (deploymentNode.getChildren().isEmpty()) {
            throw new BootstrapDependencyProcessingException(
                    "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 "
                            + extDep.info.runtimeArtifact + " is expected");
        }

        if (resolver.getProjectModuleResolver() != null && collectReloadableModules) {
            clearReloadable(deploymentNode);
        }

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

View on GitHub (pinned to e1c734241f)

Solutions

  1. Verify the deployment artifact's POM exists and is downloadable from the configured repositories (check ~/.m2/repository/.../*.pom)
  2. Ensure the deployment artifact's POM declares a dependency on its runtime artifact with the same version
  3. Rebuild and redeploy/reinstall the extension so POM and JAR are consistent (mvn install or mvn deploy)
  4. If the artifact is third-party, report/upgrade — the published artifact is malformed

Example fix

// before: deployment POM missing runtime dependency
<artifactId>acme-quarkus-extension-deployment</artifactId>
<!-- no dependencies -->
// after
<dependencies>
  <dependency>
    <groupId>com.acme</groupId>
    <artifactId>acme-quarkus-extension</artifactId>
    <version>${project.version}</version>
  </dependency>
</dependencies>
Defensive patterns

Strategy: validation

Validate before calling

// Validate the extension artifact before resolving: POM must exist and reference the runtime artifact
boolean deploymentPomValid(String groupPath, String artifactId, String version) throws IOException {
    Path pom = Path.of(System.getProperty("user.home"), ".m2", "repository", groupPath,
        artifactId, version, artifactId + "-" + version + ".pom");
    if (!Files.exists(pom)) return false;
    String content = Files.readString(pom);
    return content.contains("<dependency>") && content.contains(artifactId.replace("-deployment", ""));
}

Prevention

When it happens

Trigger: collectDependencies(deploymentArtifact, ...) returns a node with no children — the deployment artifact's POM was missing from all repositories, or the deployment artifact exists but declares no dependencies (a malformed/incorrectly built extension).

Common situations: Publishing a custom extension deployment artifact without a POM dependency on the runtime artifact; a repository serving the JAR but not the POM; a version skew where the deployment artifact was built without proper parent POM inheritance.

Related errors


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