quarkusio/quarkus · error · MojoExecutionException
Unable to get user input
Error message
Unable to get user input
What it means
When the 'create' goal runs in interactive mode (no -B), it calls prompter.collectInput() to read answers for missing project values (groupId, artifactId, version, etc.). Any IOException from that interaction is wrapped in this MojoExecutionException 'Unable to get user input'. It indicates the console/stdin interaction failed rather than any project-level problem.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java:489
prompter.addPrompt("Set the project version: ", DEFAULT_VERSION, input -> projectVersion = input);
}
if (!noCode && isBlank(example)) {
if (extensions.isEmpty()) {
prompter.addPrompt("What extensions do you wish to add (comma separated list): ", DEFAULT_EXTENSIONS,
input -> extensions = Arrays
.stream(input.split(","))
.map(String::trim).filter(Predicate.not(String::isEmpty)).collect(Collectors.toSet()));
}
prompter.addPrompt("Would you like some code to start (yes), or just an empty Quarkus project (no): ", "yes",
input -> noCode = input.startsWith("n"));
prompter.collectInput();
} else {
setProperDefaults();
}
} catch (IOException e) {
throw new MojoExecutionException("Unable to get user input", e);
}
}
private void setProperDefaults() {
if (isBlank(projectArtifactId)) {
// we need to set it for the project directory
projectArtifactId = DEFAULT_ARTIFACT_ID;
}
if (isBlank(projectGroupId)) {
projectGroupId = DEFAULT_GROUP_ID;
}
if (isBlank(projectVersion)) {
projectVersion = DEFAULT_VERSION;
}
}
private boolean shouldUseDefaults() {
// Must be called before user inputView on GitHub (pinned to e1c734241f)
Solutions
- Run in batch mode and supply all values as properties: mvn quarkus:create -B -DprojectGroupId=... -DprojectArtifactId=... -DprojectVersion=... -Dextensions=...
- Ensure stdin is an interactive terminal when you want prompts (docker run -t, don't redirect from /dev/null)
- Check that the shell/CI runner actually provides a TTY to Maven
Example fix
# before (CI, stdin closed) mvn quarkus:create # after mvn quarkus:create -B -DprojectGroupId=com.acme -DprojectArtifactId=demo -DprojectVersion=1.0.0-SNAPSHOT -Dextensions=rest
Defensive patterns
Strategy: validation
Validate before calling
# Guarantee non-interactive success: pass -B plus every required value [ -t 0 ] || [ -n "$CI" ] && exec mvn quarkus:create -B -DprojectGroupId=$G -DprojectArtifactId=$A -DprojectVersion=$V -Dextensions=$EXTS
Try / catch
// In scripts wrapping Maven, detect missing TTY and switch to batch mode if [ ! -t 0 ]; then set -- "$@" -B; fi
Prevention
- Always use -B with all -Dproject* properties in CI
- Use docker run -t only when you actually want interactive prompts
- Do not redirect stdin from /dev/null for interactive Maven goals
- Document required properties so interactive mode is rarely needed
When it happens
Trigger: Running `mvn quarkus:create` (interactive) with stdin closed or redirected from a non-tty source that errors, e.g. `< /dev/null` in some environments, a dead CI pipe, or terminal I/O failure during prompter.collectInput().
Common situations: Running interactive create inside CI/CD without -B (batch mode); wrapping Maven in scripts that close stdin; IDE terminals with broken tty; Docker/podman run 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/c1a68bf320da7ab3.
Report an issue: GitHub.