quarkusio/quarkus · error · DeploymentInjectionException

Failed to inject extension deployment dependencies

Error message

Failed to inject extension deployment dependencies

What it means

While visiting runtime dependencies to inject Quarkus extension deployment artifacts, any unexpected exception (other than an already-wrapped DeploymentInjectionException) is rethrown as a DeploymentInjectionException "Failed to inject extension deployment dependencies". This indicates the extension dependency graph augmentation failed midway.

Source

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

                }
                try {
                    resolvedDep = DependencyUtils.toAppArtifact(getResolvedArtifact(), module)
                            .setType(DependencyUtils.getType(artifact))
                            .setOptional(node.getDependency().isOptional())
                            .setScope(node.getDependency().getScope())
                            .setFlags(DependencyFlags.RUNTIME_CP | DependencyFlags.DEPLOYMENT_CP);
                    if (JavaScopes.PROVIDED.equals(resolvedDep.getScope())) {
                        resolvedDep.setFlags(DependencyFlags.COMPILE_ONLY);
                    }
                    var ext = getExtensionDependencyOrNull();
                    if (ext != null) {
                        resolvedDep.setRuntimeExtensionArtifact();
                        collectConditionalDependencies();
                    }
                } catch (DeploymentInjectionException e) {
                    throw e;
                } catch (Exception t) {
                    throw new DeploymentInjectionException("Failed to inject extension deployment dependencies", t);
                }
            }
        }

        void scheduleChildVisits(ModelResolutionTaskRunner taskRunner,
                BiConsumer<AppDep, ModelResolutionTaskRunner> childVisitor) {
            filterChildren();
            for (var child : children) {
                childVisitor.accept(child, taskRunner);
            }
        }

        /**
         * Filters out dependency nodes that point out to nodes that survived version conflict resolution.
         */
        private void filterChildren() {
            var childNodes = node.getChildren();
            List<DependencyNode> filtered = null;

View on GitHub (pinned to e1c734241f)

Solutions

  1. Inspect the cause chain to identify the failing extension and its deployment artifact.
  2. Align all Quarkus extension versions with a single quarkus-bom version.
  3. Delete the failing extension's ~/.m2/repository entries and re-resolve (mvn -U).
  4. Verify the extension's deployment artifact is published and reachable in configured repositories.

Example fix

// before
<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-rest</artifactId><version>3.0.0</version></dependency>
<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-hibernate-orm</artifactId><version>3.15.0</version></dependency> <!-- mismatched -->
// after
Import quarkus-bom 3.15.0 and omit explicit versions from all Quarkus extensions.
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify each runtime extension has a matching deployment artifact version:
for (var ext : runtimeExtensions) {
    if (!ext.getVersion().equals(quarkusCoreVersion)
        && ext.getGroupId().equals("io.quarkus")) {
        throw new IllegalStateException("Extension " + ext + " version does not match core " + quarkusCoreVersion);
    }
}

Type guard

static boolean isVersionAligned(String extVersion, String quarkusBomVersion) {
    return extVersion != null && extVersion.equals(quarkusBomVersion);
}

Try / catch

try {
    resolver.resolve(...);
} catch (DeploymentInjectionException e) {
    if (e.getMessage().equals("Failed to inject extension deployment dependencies")) {
        log.error("Cause: " + e.getCause(), e); // identify failing extension
    }
    throw e;
}

Prevention

When it happens

Trigger: visitRuntimeDependency processes a node identified as a runtime extension artifact, calls collectConditionalDependencies(), and an unexpected Throwable occurs (e.g. failure resolving the extension's deployment artifact or reading its descriptor).

Common situations: Extension deployment artifact missing from repositories; mixed Quarkus core/extension versions causing incompatible deployment descriptors; corrupt local cache for a -deployment artifact; dev-mode live reload picking up a newly added broken extension.

Related errors


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