{"record":{"id":"cf40e5d4423430d7","repo":"quarkusio/quarkus","slug":"failed-to-determine-the-quarkus-core-version-for-t","errorCode":null,"errorMessage":"Failed to determine the Quarkus core version for the project","messagePattern":"Failed to determine the Quarkus core version for the project","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/GradleUtils.java","lineNumber":42,"sourceCode":"        final List<Dependency> bomDeps = listProjectBoms(project);\n        if (bomDeps.isEmpty()) {\n            throw new GradleException(\"No platforms detected in the project\");\n        }\n\n        final Configuration boms = project.getConfigurations()\n                .detachedConfiguration(bomDeps.toArray(new org.gradle.api.artifacts.Dependency[0]));\n\n        final AtomicReference<String> quarkusVersionRef = new AtomicReference<>();\n        boms.getResolutionStrategy().eachDependency(d -> {\n            if (quarkusVersionRef.get() == null && d.getTarget().getName().equals(\"quarkus-core\")\n                    && d.getTarget().getGroup().equals(\"io.quarkus\")) {\n                quarkusVersionRef.set(d.getTarget().getVersion());\n            }\n        });\n        boms.getResolvedConfiguration();\n        final String quarkusCoreVersion = quarkusVersionRef.get();\n        if (quarkusCoreVersion == null) {\n            throw new IllegalStateException(\"Failed to determine the Quarkus core version for the project\");\n        }\n        return quarkusCoreVersion;\n    }\n\n    public static List<Dependency> listProjectBoms(Project project) {\n        final Configuration impl = project.getConfigurations().getByName(JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME);\n        List<Dependency> boms = new ArrayList<>();\n        impl.getIncoming().getDependencies()\n                .forEach(d -> {\n                    if (!(d instanceof ModuleDependency)) {\n                        return;\n                    }\n                    final ModuleDependency module = (ModuleDependency) d;\n                    final Category category = module.getAttributes().getAttribute(Category.CATEGORY_ATTRIBUTE);\n                    if (category != null\n                            && (Category.ENFORCED_PLATFORM.equals(category.getName())\n                                    || Category.REGULAR_PLATFORM.equals(category.getName()))) {\n                        boms.add(d);","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/GradleUtils.java#L24-L60","documentation":"Thrown by GradleUtils.getQuarkusCoreVersion when resolution of the project's BOM configurations cannot determine which quarkus-core artifact version applies. The method builds a detached configuration from the declared platform BOMs and inspects the resolution strategy for the quarkus-core dependency to extract the version; if that dependency never appears during resolution (wrong or incomplete platform import), the version reference stays unset and this error fires.","triggerScenarios":"listProjectBoms returned BOMs, the detached configuration resolved, but none of the resolved BOM descriptors identified the Quarkus core version (e.g. a custom/non-Quarkus BOM only, or resolution silently skipped descriptors).","commonSituations":"Using a custom platform BOM that doesn't reference io.quarkus:quarkus-core; dependency resolution reduced to metadata only; unusual BOM import syntax that GradleUtils' dependency-inspection doesn't recognize.","solutions":["Ensure the standard Quarkus platform BOM (io.quarkus.platform:quarkus-bom) is imported, not only a custom BOM","Check the resolved BOM actually pins io.quarkus:quarkus-core; pin the core version explicitly if needed","Inspect listProjectBoms(project) output to confirm which BOMs are detected"],"exampleFix":"// before\nimplementation platform(\"com.example:my-own-bom:1.0\") // no quarkus platform\n// after\nimplementation enforcedPlatform(\"io.quarkus.platform:quarkus-bom:3.x.y\")","handlingStrategy":"validation","validationCode":"if (GradleUtils.listProjectBoms(project).stream()\n        .noneMatch(d -> d.getGroup().contains(\"quarkus\"))) {\n    throw new IllegalStateException(\"Quarkus platform BOM not imported\");\n}","typeGuard":null,"tryCatchPattern":"try { v = GradleUtils.getQuarkusCoreVersion(project); } catch (IllegalStateException e) { /* BOMs resolved but no quarkus-core version found */ }","preventionTips":["Use the official Quarkus platform BOM so quarkus-core is pinned","Custom BOMs must reference io.quarkus:quarkus-core","Confirm BOM resolution isn't metadata-only"],"tags":["gradle","quarkus-core","version-detection"],"backgroundTag":"missing-platform-bom","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"}