quarkusio/quarkus · error · MojoExecutionException

Failed to determine the Quarkus core version used to build t

Error message

Failed to determine the Quarkus core version used to build the extension

What it means

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.

Source

Thrown at independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java:717

        buf.append(capability.getName());
        if (!capability.getOnlyIf().isEmpty()) {
            for (String onlyIf : capability.getOnlyIf()) {
                buf.append('?').append(onlyIf);
            }
        }
        if (!capability.getOnlyIfNot().isEmpty()) {
            for (String onlyIfNot : capability.getOnlyIfNot()) {
                buf.append("?!").append(onlyIfNot);
            }
        }
    }

    private void setBuiltWithQuarkusCoreVersion(String coreVersion, ObjectNode extObject) throws MojoExecutionException {
        if (coreVersion != null) {
            ObjectNode metadata = getMetadataNode(extObject);
            metadata.put("built-with-quarkus-core", coreVersion);
        } else if (!ignoreNotDetectedQuarkusCoreVersion) {
            throw new MojoExecutionException("Failed to determine the Quarkus core version used to build the extension");
        }
    }

    private String findQuarkusCoreVersion() throws MojoExecutionException {
        final QuarkusCoreDeploymentVersionLocator coreVersionLocator = new QuarkusCoreDeploymentVersionLocator();
        final DependencyNode root;
        try {
            root = repoSystem.collectDependencies(repoSession, newCollectRuntimeDepsRequest()).getRoot();
        } catch (MojoExecutionException e) {
            throw e;
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to collect runtime dependencies of " + project.getArtifact(), e);
        }
        root.accept(coreVersionLocator);
        return coreVersionLocator.coreVersion;
    }

    private void addExtensionDependencies(ObjectNode extObject) throws MojoExecutionException {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Ensure the deployment module depends on io.quarkus:quarkus-core (typically via quarkus-extension-maven-plugin parent conventions)
  2. Set ignoreNotDetectedQuarkusCoreVersion=true if the metadata is intentionally absent
  3. Run mvn dependency:tree -pl deployment module and verify a quarkus-core entry exists
  4. Check for dependencyManagement overrides that exclude quarkus-core

Example fix

<!-- before -->
<dependency><!-- no quarkus-core --></dependency>
<!-- after -->
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-core</artifactId>
</dependency>
Defensive patterns

Strategy: validation

Validate before calling

mvn dependency:tree -pl deployment | grep quarkus-core

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/89ad550435ce4e1f. Report an issue: GitHub.