quarkusio/quarkus · error · RuntimeException
Could not find artifact <artifactKey> among the application
Error message
Could not find artifact <artifactKey> among the application dependencies
What it means
WebJarUtil.getAppArtifact looks up a GACT coordinate among the application's resolved dependencies from the curation outcome and throws this RuntimeException when no dependency matches the requested artifact key. It indicates the extension tried to access a webjar/asset artifact that is not on the application's dependency list.
Source
Thrown at extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/webjar/WebJarUtil.java:104
try {
Files.walkFileTree(pathVisit.getPath(),
new ResourcesFileVisitor(visitor, pathVisit.getPath(), resourcesArtifact,
userApplication, dependencies, new CombinedWebJarResourcesFilter(filters),
classLoader, webJar));
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
});
}
static ResolvedDependency getAppArtifact(CurateOutcomeBuildItem curateOutcomeBuildItem, GACT artifactKey) {
for (ResolvedDependency dep : curateOutcomeBuildItem.getApplicationModel().getDependencies()) {
if (dep.getKey().equals(artifactKey)) {
return dep;
}
}
throw new RuntimeException("Could not find artifact " + artifactKey
+ " among the application dependencies");
}
private static String getModuleOverrideName(ResolvedDependency artifact, String filename) {
String type = filename.substring(filename.lastIndexOf("."));
return artifact.getArtifactId() + type;
}
private static InputStream getOverride(ResolvedDependency userApplication, Collection<ResolvedDependency> dependencies,
ClassLoader classLoader, String filename, String moduleName,
boolean useDefaultQuarkusBranding) {
// First check if the developer supplied the files (application resources, then dependencies)
InputStream overrideStream = getCustomOverride(userApplication, dependencies, filename, moduleName);
if (overrideStream == null && useDefaultQuarkusBranding) {
// Else check if Quarkus has a default branding
overrideStream = getQuarkusOverride(classLoader, filename, moduleName);
}View on GitHub (pinned to e1c734241f)
Solutions
- Add the missing artifact (exact groupId:artifactId:classifier:type:version expected by the extension) as an application dependency
- Check for exclusions in the user's pom that removed the artifact
- Verify the GACT key used matches the artifact actually resolved (versions can differ)
- Rebuild after adding the dependency so re-curation picks it up
Example fix
// before (pom.xml) <dependency> <groupId>org.webjars.npm</groupId> <artifactId>my-lib</artifactId> <!-- exclusion removed the artifact --> </dependency> // after <dependency> <groupId>org.webjars.npm</groupId> <artifactId>my-lib</artifactId> <version>1.2.3</version> </dependency>
Defensive patterns
Strategy: validation
Validate before calling
boolean present = curateOutcomeBuildItem.getApplicationModel().getDependencies().stream()
.anyMatch(d -> d.getKey().equals(expectedGact));
if (!present) throw new IllegalStateException("Missing dependency: " + expectedGact); Prevention
- Keep the webjar/artifact as a direct application dependency
- Avoid exclusions on extension starter dependencies unless required
- Match the exact GACT coordinate the extension expects
- Re-run the build after dependency changes
When it happens
Trigger: An extension calls WebJarUtil.getAppArtifact(curateOutcomeBuildItem, gact) with a GACT coordinate (e.g. for a webjar or static assets) that is not among applicationModel.getDependencies().
Common situations: User excluded the artifact/webjar from their pom; version/coordinate mismatch between extension expectations and the user's dependency tree; artifact provided by a different module id than declared; using a dev-mode feature referencing an artifact not on the runtime classpath.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- Wildcard exclusions are not supported here
- ${illegalRuntimeGAVs.size()} illegal runtime dependencies fo
- Failed to open path tree with root %s
- ${misalignmentReport}
- Dev services for ${request.getName()} requires a startable s
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/487ab85b02f3fa6d.
Report an issue: GitHub.