quarkusio/quarkus · error · DeploymentInjectionException

Failed to inject extension deployment dependencies

Error message

Failed to inject extension deployment dependencies

What it means

Thrown as a DeploymentInjectionException by visitRuntimeDependency when, while walking the runtime dependency tree and injecting Quarkus extension deployment artifacts, any exception occurs (other than a DeploymentInjectionException already in flight). It wraps the underlying failure encountered during extension deployment-dependency processing.

Source

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

                        dep.setReloadable();
                        appBuilder.addReloadableWorkspaceModule(key);
                    } else {
                        clearWalkingFlag(COLLECT_RELOADABLE_MODULES);
                    }
                }
                appBuilder.addDependency(dep);
            }
            clearWalkingFlag(COLLECT_DIRECT_DEPS);

            if (extDep != null) {
                extDep.info.ensureActivated(appBuilder);
                visitExtensionDependency(extDep);
            }
            visitRuntimeDependencies(node.getChildren());
        } catch (DeploymentInjectionException e) {
            throw e;
        } catch (Exception t) {
            throw new DeploymentInjectionException("Failed to inject extension deployment dependencies", t);
        }

        if (popExclusions) {
            exclusionStack.pollLast();
        }
        walkingFlags = prevWalkingFlags;
    }

    private ExtensionDependency getExtensionDependencyOrNull(DependencyNode node, Artifact artifact)
            throws BootstrapDependencyProcessingException {
        ExtensionDependency extDep = ExtensionDependency.get(node);
        if (extDep != null) {
            return extDep;
        }
        final ExtensionInfo extInfo = getExtensionInfoOrNull(artifact, node.getRepositories());
        if (extInfo != null) {
            final Collection<Exclusion> exclusions;
            if (exclusionStack.isEmpty()) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Inspect the wrapped cause 't' in the stack trace — it names the actual failing artifact or descriptor
  2. Resolve the underlying artifact failure (re-download, fix repository config) as this exception is only a wrapper
  3. Rebuild/refresh the extension artifact if it is locally built (mvn install the extension first)
  4. Check that all declared Quarkus extensions resolve their deployment artifacts (deployment classifier artifacts exist in repos)

Example fix

// before: locally built extension not installed
<dependency>
  <groupId>com.acme</groupId>
  <artifactId>acme-quarkus-extension</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</dependency>
// after: build and install the extension locally first
./mvnw install -f extensions/acme/
Defensive patterns

Strategy: try-catch

Validate before calling

// Ensure extension deployment artifacts resolve before walking:
// mvn dependency:get -Dartifact=g:a:jar:classifier:deployment:version
boolean extensionPresent(String ga, String v) {
    return runMaven("dependency:get -Dartifact=" + ga + ":" + v) == 0;
}

Try / catch

try {
    resolver.resolve();
} catch (DeploymentInjectionException e) {
    Throwable root = e.getCause();
    log.error("Extension injection failed; underlying cause: " + root, root);
    throw e;
}

Prevention

When it happens

Trigger: During resolve(), after the runtime tree is collected, the tree walker processes each runtime extension dependency; any failure inside (descriptor resolution, deployment tree collection, artifact resolution) is wrapped by this message.

Common situations: A runtime extension artifact whose deployment counterpart cannot be resolved; malformed quarkus-extension.properties in an extension JAR; repository/network failures mid-walk; corrupted local repo entries.

Related errors


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