quarkusio/quarkus · error · IllegalStateException
Dependency node has already been associated with an extensi
Error message
Dependency node has already been associated with an extension dependency
What it means
ExtensionDependency attaches itself to a Maven dependency node via node.setData(QUARKUS_EXTENSION_DEPENDENCY, this). If the node already has data and the key is already taken, a different ExtensionDependency was previously bound to the same node — an internal invariant violation indicating the resolver tried to process the same runtime extension node twice. This is an IllegalStateException (a bug/consistency guard), not a user-input problem.
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java:982
final ExtensionInfo info;
final DependencyNode runtimeNode;
final Collection<Exclusion> exclusions;
boolean conditionalDepsQueued;
private List<ExtensionDependency> extDeps;
private DependencyNode deploymentNode;
private boolean presentInTargetGraph;
ExtensionDependency(ExtensionInfo info, DependencyNode node, Collection<Exclusion> exclusions) {
this.runtimeNode = node;
this.info = info;
this.exclusions = exclusions;
@SuppressWarnings("unchecked")
final Map<Object, Object> data = (Map<Object, Object>) node.getData();
if (data.isEmpty()) {
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 "View on GitHub (pinned to e1c734241f)
Solutions
- This is an internal consistency guard — capture the full stack trace and dependency tree (mvn dependency:tree) and report it to Quarkus (bootstrap maven-resolver issue).
- Clean local state: delete the relevant artifacts from ~/.m2/repository and rebuild incrementally from scratch.
- Try disabling workspace discovery / local project resolution if you're building with locally installed extension snapshots, and use remote artifacts instead.
- Upgrade Quarkus — graph-processing edge cases are fixed regularly in the bootstrap resolver.
Defensive patterns
Strategy: try-catch
Try / catch
try {
quarkusBuild();
} catch (IllegalStateException e) {
if (e.getMessage().contains("already been associated with an extension dependency")) {
throw new IllegalStateException("Quarkus bootstrap internal bug; report with mvn dependency:tree output", e);
}
throw e;
} Prevention
- Keep Quarkus and bootstrap versions current — this is an internal invariant, fixed upstream.
- Avoid mixing locally-installed snapshot extensions with released platform extensions.
- Report the full stack trace plus dependency tree to the Quarkus project.
- Test with a clean ~/.m2/repository to rule out stale state.
When it happens
Trigger: The ExtensionDependency constructor is invoked twice for the same DependencyNode that already carries non-empty data with QUARKUS_EXTENSION_DEPENDENCY set — i.e. the same runtime extension artifact node is visited by two different extension processing paths (e.g. a direct and a conditional dependency both resolving to the identical node).
Common situations: Unusual dependency graphs where the same runtime artifact node appears through multiple paths (workspace projects, locally-installed extension builds); custom Maven resolver implementations; Quarkus bootstrap bugs triggered by exotic graph shapes (cycles or relocated artifacts).
Related errors
- Failed to locate among application dependencies
- Quarkus extension deployment artifact does not appear to de
- Failed to initialize deployment dependencies resolver
- Failed to normalize the dependency graph
- Dependency node has already been associated with an extensi
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/219aa494b4d5735c.
Report an issue: GitHub.