quarkusio/quarkus · error · IllegalArgumentException
Failed to locate among application dependencies
Error message
Failed to locate among application dependencies
What it means
getResolvedDependency(key) looks up an artifact key in the application model being built (appBuilder.getDependency(key)); if absent — and it is not the application's own artifact — it throws this IllegalArgumentException. It means the resolver was asked for a dependency (typically while wiring an extension node) that was never recorded in the resolved application dependency set.
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java:1329
sb.append(", build-time classpath");
}
if (d.isFlagSet(DependencyFlags.RUNTIME_EXTENSION_ARTIFACT)) {
sb.append(", extension");
}
if (d.isFlagSet(DependencyFlags.RELOADABLE)) {
sb.append(", reloadable");
}
}
sb.append(')');
}
private ResolvedDependencyBuilder getResolvedDependency(ArtifactKey key) {
var resolvedDep = appBuilder.getDependency(key);
if (resolvedDep == null) {
if (appBuilder.getApplicationArtifact().getKey().equals(key)) {
return appBuilder.getApplicationArtifact();
}
throw new IllegalArgumentException("Failed to locate " + key + " among application dependencies");
}
return resolvedDep;
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Check mvn dependency:tree for the artifact key in the message and understand why it is absent (scope, exclusion, conflict mediation).
- Remove <exclusions> or scope restrictions that filter the artifact out of the runtime classpath.
- If using workspace discovery (local project builds), verify the project is part of the build (included in the reactor/quarkus.workspace.application-... config).
- Reproduce with a minimal pom.xml and report to Quarkus if the dependency is clearly on the classpath — likely a resolver bug.
Example fix
// before: artifact excluded, later looked up by an extension
<dependency>
<groupId>com.acme</groupId>
<artifactId>myext</artifactId>
<exclusions>
<exclusion><groupId>io.quarkus</groupId><artifactId>quarkus-core</artifactId></exclusion>
</exclusions>
</dependency>
// after: drop the exclusion
<dependency>
<groupId>com.acme</groupId>
<artifactId>myext</artifactId>
</dependency> Defensive patterns
Strategy: validation
Validate before calling
// confirm the artifact is on the effective classpath before the build
Process p = new ProcessBuilder("mvn", "dependency:tree", "-Dverbose")
.inheritIO().start();
p.waitFor();
// inspect output: the missing key must appear without 'omitted for conflict' or exclusion Prevention
- Avoid <exclusions> that filter artifacts extensions still need at build time.
- Resolve version conflicts explicitly with dependencyManagement rather than letting mediation drop artifacts.
- Keep workspace modules in the reactor when using local project resolution.
- Review '-Dverbose' dependency trees for omitted-for-conflict entries when the error appears.
When it happens
Trigger: BuildDependencyGraphVisitor.getResolvedDependency(ArtifactKey) is called with a key not present in appBuilder — e.g. a dependency node reached during graph visiting that was skipped by scope/optional filters earlier, or a key referring to a workspace/artifact filtered out of the final model.
Common situations: Dependencies excluded by scope (test/provided) but referenced by extension processing; workspace modules excluded via quarkus.workspace or .mvn/maven.config settings; version conflicts removing a node whose key is later requested; bootstrap bugs with conditional extension dependencies.
Related errors
- Dependency node has already been associated with an extensi
- Failed to add platform properties + artifact
- Failed to process + artifactPath
- Failed to locate ${targetCoords.toCompactCoords()} among the
- Flags are empty
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/2885ad440b2dd541.
Report an issue: GitHub.