{"record":{"id":"487ab85b02f3fa6d","repo":"quarkusio/quarkus","slug":"could-not-find-artifact-artifactkey-among-the-ap","errorCode":null,"errorMessage":"Could not find artifact <artifactKey> among the application dependencies","messagePattern":"Could not find artifact <artifactKey> among the application dependencies","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/webjar/WebJarUtil.java","lineNumber":104,"sourceCode":"                try {\n                    Files.walkFileTree(pathVisit.getPath(),\n                            new ResourcesFileVisitor(visitor, pathVisit.getPath(), resourcesArtifact,\n                                    userApplication, dependencies, new CombinedWebJarResourcesFilter(filters),\n                                    classLoader, webJar));\n                } catch (IOException e) {\n                    throw new UncheckedIOException(e);\n                }\n            }\n        });\n    }\n\n    static ResolvedDependency getAppArtifact(CurateOutcomeBuildItem curateOutcomeBuildItem, GACT artifactKey) {\n        for (ResolvedDependency dep : curateOutcomeBuildItem.getApplicationModel().getDependencies()) {\n            if (dep.getKey().equals(artifactKey)) {\n                return dep;\n            }\n        }\n        throw new RuntimeException(\"Could not find artifact \" + artifactKey\n                + \" among the application dependencies\");\n    }\n\n    private static String getModuleOverrideName(ResolvedDependency artifact, String filename) {\n        String type = filename.substring(filename.lastIndexOf(\".\"));\n        return artifact.getArtifactId() + type;\n    }\n\n    private static InputStream getOverride(ResolvedDependency userApplication, Collection<ResolvedDependency> dependencies,\n            ClassLoader classLoader, String filename, String moduleName,\n            boolean useDefaultQuarkusBranding) {\n\n        // First check if the developer supplied the files (application resources, then dependencies)\n        InputStream overrideStream = getCustomOverride(userApplication, dependencies, filename, moduleName);\n        if (overrideStream == null && useDefaultQuarkusBranding) {\n            // Else check if Quarkus has a default branding\n            overrideStream = getQuarkusOverride(classLoader, filename, moduleName);\n        }","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/webjar/WebJarUtil.java#L86-L122","documentation":"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.","triggerScenarios":"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().","commonSituations":"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.","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"],"exampleFix":"// before (pom.xml)\n<dependency>\n  <groupId>org.webjars.npm</groupId>\n  <artifactId>my-lib</artifactId>\n  <!-- exclusion removed the artifact -->\n</dependency>\n// after\n<dependency>\n  <groupId>org.webjars.npm</groupId>\n  <artifactId>my-lib</artifactId>\n  <version>1.2.3</version>\n</dependency>","handlingStrategy":"validation","validationCode":"boolean present = curateOutcomeBuildItem.getApplicationModel().getDependencies().stream()\n    .anyMatch(d -> d.getKey().equals(expectedGact));\nif (!present) throw new IllegalStateException(\"Missing dependency: \" + expectedGact);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["maven","dependencies","build-time","webjar"],"backgroundTag":"missing-dependency","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}