{"record":{"id":"3fdca37249a6c644","repo":"quarkusio/quarkus","slug":"unable-to-get-user-input","errorCode":null,"errorMessage":"Unable to get user input","messagePattern":"Unable to get user input","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/CreateExtensionMojo.java","lineNumber":338,"sourceCode":"            return;\n        }\n        try {\n            final Prompter prompter = new Prompter();\n            if (project == null || !project.getArtifactId().endsWith(\"quarkus-parent\")) {\n                if (isBlank(quarkusVersion)) {\n                    quarkusVersion = getPluginVersion();\n                }\n                if (isBlank(groupId)) {\n                    prompter.addPrompt(\"Set the extension groupId: \", \"org.acme\", input -> groupId = input);\n                }\n            }\n            autoComputeQuarkiverseExtensionId();\n            if (isBlank(extensionId)) {\n                prompter.addPrompt(\"Set the extension id: \", input -> extensionId = input);\n            }\n            prompter.collectInput();\n        } catch (IOException e) {\n            throw new MojoExecutionException(\"Unable to get user input\", e);\n        }\n    }\n}\n","sourceCodeStart":320,"sourceCodeEnd":342,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/CreateExtensionMojo.java#L320-L342","documentation":"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.","triggerScenarios":"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.","commonSituations":"Running quarkus:create-extension in CI without a TTY, redirected stdin (mvn < file), IDE Maven runners with no console attached, docker exec without -t.","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"],"exampleFix":"// before\nmvn quarkus:create-extension  // no TTY in CI -> prompts fail\n// after\nmvn -B quarkus:create-extension -DextensionId=my-ext -DextensionName=\"My ext\" -DgroupId=org.acme -Dversion=1.0.0-SNAPSHOT","handlingStrategy":"validation","validationCode":"// ensure no prompt will be needed before invoking in CI\nboolean hasTty = System.console() != null;\nboolean valuesProvided = System.getProperties().containsKey(\"extensionId\");\nif (!hasTty && !valuesProvided)\n    throw new IllegalStateException(\"Non-interactive run: pass -DextensionId (and other values) to avoid prompts\");","typeGuard":null,"tryCatchPattern":"try {\n    mvn quarkus:create-extension ...\n} catch (MojoExecutionException e) {\n    if (e.getMessage().startsWith(\"Unable to get user input\")) {\n        logger.error(\"No interactive console; rerun with all -D values set (e.g. -DextensionId)\");\n    }\n}","preventionTips":["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"],"tags":["maven","interactive-prompt","stdin","ci"],"backgroundTag":"missing-interactive-tty","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}