{"record":{"id":"ca4b1bdcb321f788","repo":"quarkusio/quarkus","slug":"failed-to-generate-extension","errorCode":null,"errorMessage":"Failed to generate Extension","messagePattern":"Failed to generate Extension","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/CreateExtensionMojo.java","lineNumber":300,"sourceCode":"                .packageName(packageName)\n                .namespaceId(namespaceId)\n                .namespaceName(namespaceName)\n                .quarkusVersion(quarkusVersion)\n                .quarkusBomGroupId(quarkusBomGroupId)\n                .quarkusBomArtifactId(quarkusBomArtifactId)\n                .quarkusBomVersion(quarkusBomVersion)\n                .javaVersion(javaVersion)\n                .withCodestart(withCodestart)\n                .withoutUnitTest(withoutTests || withoutUnitTest)\n                .withoutDevModeTest(withoutTests || withoutDevModeTest)\n                .withoutIntegrationTests(withoutTests || withoutIntegrationTests);\n\n        boolean success;\n\n        try {\n            success = createExtension.execute().isSuccess();\n        } catch (QuarkusCommandException e) {\n            throw new MojoExecutionException(\"Failed to generate Extension\", e);\n        }\n\n        if (!success) {\n            throw new MojoExecutionException(\"Failed to generate Extension\");\n        }\n    }\n\n    private void autoComputeQuarkiverseExtensionId() {\n        if (isQuarkiverseGroupId(groupId) && isEmpty(extensionId)) {\n            extensionId = extractQuarkiverseExtensionId(groupId);\n        }\n    }\n\n    private String getPluginVersion() throws MojoExecutionException {\n        return CreateUtils.resolvePluginInfo(CreateExtensionMojo.class).getVersion();\n    }\n\n    private void promptValues() throws MojoExecutionException {","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/CreateExtensionMojo.java#L282-L318","documentation":"Wraps a QuarkusCommandException raised inside CreateExtension.execute() — the actual extension scaffolding command — into a MojoExecutionException. It means the generation command aborted with an exception (template rendering, file writes, validation) rather than returning a normal failure.","triggerScenarios":"createExtension.execute() throws QuarkusCommandException during quarkus:create-extension — typically template copy/render failures or I/O errors while writing the new extension project.","commonSituations":"Target directory not writable or already contains conflicting files, template resources missing from the classpath (corrupt/quarantined plugin jar), unusual file-system permissions (NFS, read-only dir).","solutions":["Inspect the chained QuarkusCommandException cause in the Maven log for the concrete file/IO failure","Ensure the target directory (-Dbasedir / cwd) is writable and does not already contain the extension","Update or reinstall the Quarkus Maven plugin (corrupted plugin jar breaks template loading)","Retry in a fresh empty directory to rule out leftover files"],"exampleFix":"// before\nmvn quarkus:create-extension  // run in existing dir with stale files\n// after\nmkdir fresh-ext && cd fresh-ext && mvn quarkus:create-extension -DextensionId=my-ext","handlingStrategy":"try-catch","validationCode":"// ensure target is writable before generation\njava.nio.file.Path dir = java.nio.file.Path.of(\"\").toAbsolutePath();\nif (!java.nio.file.Files.isWritable(dir))\n    throw new IllegalStateException(\"Target directory not writable: \" + dir);","typeGuard":null,"tryCatchPattern":"try {\n    mvn quarkus:create-extension ...\n} catch (MojoExecutionException e) {\n    if (e.getCause() instanceof QuarkusCommandException qce) {\n        logger.error(\"Generation aborted: {}\", qce.getCause(), qce); // fix IO/template cause\n    }\n}","preventionTips":["Always scaffold into a fresh empty directory","Keep the Quarkus Maven plugin version consistent with your Quarkus platform version","Check filesystem permissions before running generators"],"tags":["maven","project-generation","scaffolding"],"backgroundTag":"project-generation-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}