quarkusio/quarkus · error · QuarkusCommandException
Failed to create project because of invalid extensions
Error message
Failed to create project because of invalid extensions
What it means
computeRequiredExtensions throws QuarkusCommandException('Failed to create project because of invalid extensions') when computeExtensionsFromQuery returns null, i.e. at least one extension keyword could not be resolved against the extension catalog.
Source
Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java:301
return QuarkusCommandOutcome.success();
}
private static void setQuarkusProperties(QuarkusCommandInvocation invocation, ExtensionCatalog catalog) {
var quarkusProps = ToolsUtils.readQuarkusProperties(catalog);
quarkusProps.forEach((k, v) -> {
final String name = k.toString();
if (!invocation.hasValue(name)) {
invocation.setValue(name, v.toString());
}
});
}
private List<Extension> computeRequiredExtensions(ExtensionCatalog catalog,
final Set<String> extensionsQuery, MessageWriter log) throws QuarkusCommandException {
final List<Extension> extensionsToAdd = computeExtensionsFromQuery(catalog, extensionsQuery, log);
if (extensionsToAdd == null) {
throw new QuarkusCommandException("Failed to create project because of invalid extensions");
}
return extensionsToAdd;
}
private static List<ExtensionCatalog> getExtensionOrigins(ExtensionCatalog extensionCatalog,
List<Extension> extensionsToAdd)
throws QuarkusCommandException {
if (extensionsToAdd.isEmpty() && extensionCatalog.isPlatform()) {
return List.of(extensionCatalog);
}
// we add quarkus-core as a selected extension here only to include the quarkus-bom
// in the list of platforms. quarkus-core won't be added to the generated POM though.
final Extension quarkusCore = findQuarkusCore(extensionCatalog);
final List<ExtensionOrigins> originsWithPreferences;
if (extensionsToAdd.isEmpty()) {
// if no extensions were requested, we select the core BOMView on GitHub (pinned to e1c734241f)
Solutions
- Replace keywords with exact extension names or full GAV coordinates
- Run the extension list command to confirm available names for the configured platform
- Check the configured Quarkus version/registry contains the requested extensions
- Split the query to find which specific keyword fails and fix it
Example fix
// before quarkus create app -x hibernate x // after quarkus create app -x quarkus-hibernate-orm x
Defensive patterns
Strategy: validation
Validate before calling
for (String q : extensionsQuery) {
List<Extension> hits = computeExtensionsFromQuery(catalog, Set.of(q), log);
if (hits == null || hits.isEmpty()) throw new IllegalArgumentException("Unresolvable extension: " + q);
} Try / catch
try { List<Extension> exts = computeRequiredExtensions(catalog, query, log); } catch (QuarkusCommandException e) { /* fix the extension query before retrying */ } Prevention
- Resolve each keyword individually to find the failing one
- Use canonical artifact ids (post-rename names) in CI scripts
- Pin platform versions so catalog contents are deterministic
- Check network/registry availability before offline runs
When it happens
Trigger: Creating a project with -x/--extensions values that match no catalog entry or are ambiguous, during CreateProjectCommandHandler execution (via extensionsToAdd).
Common situations: Typos in extension artifact ids; using old names after platform renames; keywords matching multiple extensions without exact name/GAV; offline with no registry access.
Related errors
- The specified %s identifier (%s) contains invalid characters
- Invalid value '%s' for option '--stream'. Value should be sp
- Invalid value '%s' for option '--platform-bom'. Value should
- Multiple extensions found for keyword (no message; handled a
- Failed to create project because of invalid extensions
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/0176bc8cab58e3d4.
Report an issue: GitHub.