quarkusio/quarkus · error · QuarkusCommandException
'${key}' value is required.
Error message
'${key}' value is required. What it means
CreateExtension requires certain QuarkusExtensionData values (e.g. extension-id, group-id, version) to be present as non-empty strings. ensureRequiredStringData throws this QuarkusCommandException when a required key is missing or empty in the provided extension data.
Source
Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/CreateExtension.java:472
return LayoutType.OTHER_PLATFORM;
}
}
if (isQuarkiverseGroupId(groupId))
return LayoutType.QUARKIVERSE;
return LayoutType.STANDALONE;
}
public static boolean isQuarkiverseGroupId(String groupId) {
return groupId != null && groupId.contains(DEFAULT_QUARKIVERSE_PARENT_GROUP_ID);
}
public static String extractQuarkiverseExtensionId(String groupId) {
return groupId.replace(DEFAULT_QUARKIVERSE_PARENT_GROUP_ID + ".", "");
}
private void ensureRequiredStringData(QuarkusExtensionData key) throws QuarkusCommandException {
if (!data.containsNonEmptyStringForKey(key)) {
throw new QuarkusCommandException("'" + key.toString() + "' value is required.");
}
}
private void ensureRequiredStringData(QuarkusExtensionData key, String detectedValue) throws QuarkusCommandException {
if (!data.containsNonEmptyStringForKey(key)) {
if (isEmpty(detectedValue)) {
throw new QuarkusCommandException(
"You need to define '" + key.toString() + "' because it was not found in the project hierarchy.");
}
data.putIfNonEmptyString(key, detectedValue);
}
}
static String resolveExtensionPackage(String groupId, String artifactId) {
final Deque<String> segments = new ArrayDeque<>();
for (String segment : groupId.split("[.\\-]+")) {
if (segments.isEmpty() || !segments.peek().equals(segment)) {
segments.add(segment);View on GitHub (pinned to e1c734241f)
Solutions
- Supply all required data keys as non-empty strings before calling prepare
- Run interactively so required values are prompted and filled
- Check QuarkusExtensionData enum values for the exact required key names
Example fix
// before
Map<String, Object> data = Map.of("extension-id", ""); // empty
// after
Map<String, Object> data = Map.of("extension-id", "my-ext", "group-id", "org.acme"); Defensive patterns
Strategy: validation
Validate before calling
for (QuarkusExtensionData key : List.of(QuarkusExtensionData.EXTENSION_ID, QuarkusExtensionData.GROUP_ID)) {
if (!data.containsNonEmptyStringForKey(key)) throw new IllegalStateException(key + " must be a non-empty string");
} Try / catch
try { createExtension.prepare(); } catch (QuarkusCommandException e) { if (e.getMessage().endsWith("value is required.")) { promptUserForMissingKeys(); } } Prevention
- Populate all required QuarkusExtensionData keys before prepare
- Prefer interactive mode so prompts collect required values
- Guard CI scripts with explicit flags for every required option
When it happens
Trigger: Calling prepare on CreateExtension without a non-empty string for a required QuarkusExtensionData key, with no detected fallback value available.
Common situations: Non-interactive runs lacking required answers; data map keys misspelled or empty strings passed; CI scripts not supplying extension-id/extension-name.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- className parameter is required
- You need to define '${key}' because it was not found in the
- Extra steps left over
- Unknown start character for json value: %s
- name cannot be null
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/c4e84b28822dcf6e.
Report an issue: GitHub.