quarkusio/quarkus · error · MojoExecutionException

The project was created but (some of) the requested extensio

Error message

The project was created but (some of) the requested extensions couldn't be added.

What it means

After the project skeleton is generated successfully, execute() checks a success flag set by the extension-adding step; if any requested extensions could not be added, it throws this MojoExecutionException. It means the new project exists on disk but is missing some of the -Dextensions you asked for. This is a partial-success failure: the build step completed but user intent was not fully honored.

Source

Thrown at devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java:356

                    parentPomModel.addModule(this.projectArtifactId);
                }
                File subModulePomFile = new File(projectRoot, buildToolEnum.getDependenciesFile());
                Model subModulePomModel = MojoUtils.readPom(subModulePomFile);
                Parent parent = new Parent();
                parent.setGroupId(parentPomModel.getGroupId());
                parent.setArtifactId(parentPomModel.getArtifactId());
                parent.setVersion(parentPomModel.getVersion());
                subModulePomModel.setParent(parent);
                MojoUtils.writeFormatted(parentPomModel, pom);
                MojoUtils.writeFormatted(subModulePomModel, subModulePomFile);
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to generate Quarkus project", e);
        }
        if (success) {
            printUserInstructions(projectRoot);
        } else {
            throw new MojoExecutionException(
                    "The project was created but (some of) the requested extensions couldn't be added.");
        }
    }

    private ExtensionCatalogResolver getExtensionCatalogResolver(MavenArtifactResolver mvn, MojoMessageWriter log) {
        if (!QuarkusProjectHelper.isRegistryClientEnabled()) {
            return ExtensionCatalogResolver.empty();
        }
        ExtensionCatalogResolver catalogResolver;
        try {
            catalogResolver = QuarkusProjectHelper.getCatalogResolver(mvn, log);
            if (refresh) {
                getLog().debug("Clearing local extension catalog cache");
                catalogResolver.clearRegistryCache();
            }
        } catch (RegistryResolutionException e) {
            // fall back to the default platform
            catalogResolver = ExtensionCatalogResolver.empty();

View on GitHub (pinned to e1c734241f)

Solutions

  1. Check the earlier log output listing which extension(s) failed to be added
  2. Validate each extension name against `mvn quarkus:list-extensions` or code.quarkus.io
  3. Re-run the add step in the generated project: `mvn quarkus:add-extension -Dextensions=<missing ones>`
  4. Ensure the platform version you target actually contains the requested extensions
  5. Verify network/registry client access to the Quarkus extension registry

Example fix

// before
mvn quarkus:create -Dextensions=hibernate-orm-jpa
// after: use the correct artifactId
mvn quarkus:create -Dextensions=hibernate-orm
Defensive patterns

Strategy: validation

Validate before calling

# Validate extension names before create
mvn quarkus:list-extensions | grep -w hibernate-orm
# or check the platform catalog for the target version on code.quarkus.io

Try / catch

// Check log output for which extension failed, then retry incrementally:
mvn quarkus:add-extension -Dextensions=<missing-extension>

Prevention

When it happens

Trigger: Running `mvn quarkus:create -Dextensions=foo,bar` where the code path that invokes the create/add goal in the generated project returns a non-zero/failed result, e.g. an extension id or GAV that does not resolve in the platform catalog.

Common situations: Typo in an extension artifactId (e.g. 'jpa' vs 'hibernate-orm'); requesting an extension that exists only in a newer platform version; offline mode preventing resolution of extension catalog metadata.

Related errors


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