{"record":{"id":"89ad550435ce4e1f","repo":"quarkusio/quarkus","slug":"failed-to-determine-the-quarkus-core-version-used","errorCode":null,"errorMessage":"Failed to determine the Quarkus core version used to build the extension","messagePattern":"Failed to determine the Quarkus core version used to build the extension","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java","lineNumber":717,"sourceCode":"        buf.append(capability.getName());\n        if (!capability.getOnlyIf().isEmpty()) {\n            for (String onlyIf : capability.getOnlyIf()) {\n                buf.append('?').append(onlyIf);\n            }\n        }\n        if (!capability.getOnlyIfNot().isEmpty()) {\n            for (String onlyIfNot : capability.getOnlyIfNot()) {\n                buf.append(\"?!\").append(onlyIfNot);\n            }\n        }\n    }\n\n    private void setBuiltWithQuarkusCoreVersion(String coreVersion, ObjectNode extObject) throws MojoExecutionException {\n        if (coreVersion != null) {\n            ObjectNode metadata = getMetadataNode(extObject);\n            metadata.put(\"built-with-quarkus-core\", coreVersion);\n        } else if (!ignoreNotDetectedQuarkusCoreVersion) {\n            throw new MojoExecutionException(\"Failed to determine the Quarkus core version used to build the extension\");\n        }\n    }\n\n    private String findQuarkusCoreVersion() throws MojoExecutionException {\n        final QuarkusCoreDeploymentVersionLocator coreVersionLocator = new QuarkusCoreDeploymentVersionLocator();\n        final DependencyNode root;\n        try {\n            root = repoSystem.collectDependencies(repoSession, newCollectRuntimeDepsRequest()).getRoot();\n        } catch (MojoExecutionException e) {\n            throw e;\n        } catch (Exception e) {\n            throw new MojoExecutionException(\"Failed to collect runtime dependencies of \" + project.getArtifact(), e);\n        }\n        root.accept(coreVersionLocator);\n        return coreVersionLocator.coreVersion;\n    }\n\n    private void addExtensionDependencies(ObjectNode extObject) throws MojoExecutionException {","sourceCodeStart":699,"sourceCodeEnd":735,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java#L699-L735","documentation":"The mojo inspects the deployment artifact's dependency tree to find which Quarkus core version the extension was built against. If the QuarkusCoreDeploymentVersionLocator finds no core version and the flag ignoreNotDetectedQuarkusCoreVersion is false, it fails the build because the extension descriptor metadata would lack built-with-quarkus-core.","triggerScenarios":"Building an extension descriptor whose deployment artifact has no dependency on quarkus-core (e.g. missing quarkus-core deployment dependency), or the dependency tree collection yields no core version.","commonSituations":"Extension pom accidentally removing quarkus-core dependency; multi-module setups where deployment module depends on wrong parent; setting ignore-not-detected-quarkus-core-version incorrectly.","solutions":["Ensure the deployment module depends on io.quarkus:quarkus-core (typically via quarkus-extension-maven-plugin parent conventions)","Set ignoreNotDetectedQuarkusCoreVersion=true if the metadata is intentionally absent","Run mvn dependency:tree -pl deployment module and verify a quarkus-core entry exists","Check for dependencyManagement overrides that exclude quarkus-core"],"exampleFix":"<!-- before -->\n<dependency><!-- no quarkus-core --></dependency>\n<!-- after -->\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-core</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"mvn dependency:tree -pl deployment | grep quarkus-core","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include quarkus-core dependency in deployment modules","Verify built-with-quarkus-core metadata after builds","Avoid dependencyManagement excludes that drop quarkus-core"],"tags":["maven","quarkus-core","descriptor"],"backgroundTag":"quarkus-core-version-not-detected","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}