quarkusio/quarkus · error · MojoExecutionException
Unable to get user input
Error message
Unable to get user input
What it means
The interactive prompt loop for extension id/name/description wraps IOException from the prompter (console I/O) into a MojoExecutionException. It means the plugin could not read the user's input from the terminal while collecting required values.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/CreateExtensionMojo.java:338
return;
}
try {
final Prompter prompter = new Prompter();
if (project == null || !project.getArtifactId().endsWith("quarkus-parent")) {
if (isBlank(quarkusVersion)) {
quarkusVersion = getPluginVersion();
}
if (isBlank(groupId)) {
prompter.addPrompt("Set the extension groupId: ", "org.acme", input -> groupId = input);
}
}
autoComputeQuarkiverseExtensionId();
if (isBlank(extensionId)) {
prompter.addPrompt("Set the extension id: ", input -> extensionId = input);
}
prompter.collectInput();
} catch (IOException e) {
throw new MojoExecutionException("Unable to get user input", e);
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Supply all values via -D properties (-DextensionId, -DextensionName, -DextensionDescription, -DgroupId, -Dversion) so no prompt is needed
- Run the command in an interactive terminal with stdin attached
- For CI, use a non-interactive invocation with all required -D flags set
- Avoid redirecting stdin when invoking Maven
Example fix
// before mvn quarkus:create-extension // no TTY in CI -> prompts fail // after mvn -B quarkus:create-extension -DextensionId=my-ext -DextensionName="My ext" -DgroupId=org.acme -Dversion=1.0.0-SNAPSHOT
Defensive patterns
Strategy: validation
Validate before calling
// ensure no prompt will be needed before invoking in CI
boolean hasTty = System.console() != null;
boolean valuesProvided = System.getProperties().containsKey("extensionId");
if (!hasTty && !valuesProvided)
throw new IllegalStateException("Non-interactive run: pass -DextensionId (and other values) to avoid prompts"); Try / catch
try {
mvn quarkus:create-extension ...
} catch (MojoExecutionException e) {
if (e.getMessage().startsWith("Unable to get user input")) {
logger.error("No interactive console; rerun with all -D values set (e.g. -DextensionId)");
}
} Prevention
- In CI, always supply every prompted value via -D properties
- Never redirect stdin when running interactive Maven goals
- Use -B (batch mode) plus full -D flags for reproducible scaffolding
When it happens
Trigger: prompter.collectInput() (or addPrompt callbacks reading stdin) throws IOException because there is no interactive console — raised in promptValues, called from execute when extensionId (or other values) is blank.
Common situations: Running quarkus:create-extension in CI without a TTY, redirected stdin (mvn < file), IDE Maven runners with no console attached, docker exec without -t.
Related errors
- Unable to determine groupId and artifactId of the jar that c
- Unable to determine groupId and artifactId of the extension
- Unable to determine groupId and artifactId of the jar that c
- Unable to parse pom file: ${pom}
- The specified %s identifier (%s) contains invalid characters
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/3fdca37249a6c644.
Report an issue: GitHub.