{"record":{"id":"c99d05769ecad076","repo":"quarkusio/quarkus","slug":"failed-to-determine-the-quarkus-core-version-for-t-c99d05","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/tasks/QuarkusPlatformTask.java","lineNumber":127,"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    protected QuarkusProject getQuarkusProject(boolean limitExtensionsToImportedPlatforms) {\n        final GradleMessageWriter log = messageWriter();\n        final ExtensionCatalog catalog = extensionsCatalog(limitExtensionsToImportedPlatforms, log);\n\n        final Path projectDirPath = project.getProjectDir().toPath();\n        final Path rootProjectPath = project.getParent() != null ? project.getRootProject().getProjectDir().toPath()\n                : projectDirPath;\n        final BuildFile buildFile;\n        if (Files.exists(rootProjectPath.resolve(\"settings.gradle.kts\"))\n                && Files.exists(projectDirPath.resolve(\"build.gradle.kts\"))) {\n            buildFile = new GradleKotlinProjectBuildFile(project, catalog);\n        } else if (Files.exists(rootProjectPath.resolve(\"settings.gradle\"))\n                && Files.exists(projectDirPath.resolve(\"build.gradle\"))) {\n            buildFile = new GradleGroovyProjectBuildFile(project, catalog);","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusPlatformTask.java#L109-L145","documentation":"quarkusCoreVersion() scans the resolved platform BOMs for the io.quarkus:quarkus-core dependency to learn the core version. If resolution succeeds but no quarkus-core version is found in any BOM, it throws IllegalStateException(\"Failed to determine the Quarkus core version for the project\").","triggerScenarios":"Platform BOMs exist but none contain io.quarkus:quarkus-core — e.g. an unrelated BOM only, a heavily filtered/custom platform BOM, or resolution configured to skip quarkus-core entries.","commonSituations":"Custom/trimmed enterprise platform BOMs; importing quarkus-bom with exclusion rules that drop quarkus-core; corrupted local Maven cache yielding an incomplete BOM resolution.","solutions":["Ensure the official io.quarkus.platform:quarkus-bom is imported; it always declares quarkus-core.","Clear the Gradle/Maven cache for the platform artifacts (rm -rf ~/.gradle/caches/modules-2) and re-resolve.","Pin a matching quarkus plugin/platform version pair so the BOM contains quarkus-core."],"exampleFix":"// before\nimplementation enforcedPlatform(\"com.example:custom-bom:1.0\")\n\n// after\nimplementation enforcedPlatform(\"io.quarkus.platform:quarkus-bom:3.15.1\")","handlingStrategy":"validation","validationCode":"// after resolution, confirm quarkus-core is on the platform-managed classpath\ndef core = configurations.implementation.resolvedConfiguration.firstLevelModuleDependencies.find { it.moduleGroup == 'io.quarkus' && it.moduleName == 'quarkus-core' }\nassert core != null : 'quarkus-core not resolved from platform BOM'","typeGuard":null,"tryCatchPattern":"try { quarkusCoreVersion() } catch (IllegalStateException e) { if (e.message.contains('Failed to determine the Quarkus core version')) { /* re-import official BOM, clean caches */ } }","preventionTips":["Avoid custom BOMs that trim quarkus-core management.","Clean Gradle module cache if BOM resolution appears incomplete.","Keep Quarkus Gradle plugin and platform BOM versions matched."],"tags":["gradle","platform","version","bom"],"backgroundTag":"quarkus-core-version-unresolved","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"}