{"record":{"id":"548ea9fb6a82989a","repo":"quarkusio/quarkus","slug":"failed-to-persist-output-resolve-bootstrapconsta-548ea9","errorCode":null,"errorMessage":"Failed to persist ${output.resolve(BootstrapConstants.QUARKUS_EXTENSION_JSON_FILE_NAME)}","messagePattern":"Failed to persist (.+?)","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java","lineNumber":394,"sourceCode":"            throw new MojoExecutionException(e.getMessage(), e.getCause());\n        }\n\n        final DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();\n        prettyPrinter.indentArraysWith(DefaultIndenter.SYSTEM_LINEFEED_INSTANCE);\n\n        try (BufferedWriter bw = Files\n                .newBufferedWriter(output.resolve(BootstrapConstants.QUARKUS_EXTENSION_FILE_NAME))) {\n            bw.write(getMapper(true).writer().with(prettyPrinter).writeValueAsString(extObject));\n        } catch (IOException e) {\n            throw new MojoExecutionException(\n                    \"Failed to persist \" + output.resolve(BootstrapConstants.QUARKUS_EXTENSION_FILE_NAME), e);\n        }\n\n        try (BufferedWriter bw = Files\n                .newBufferedWriter(output.resolve(BootstrapConstants.QUARKUS_EXTENSION_JSON_FILE_NAME))) {\n            bw.write(getMapper(false).writer().with(prettyPrinter).writeValueAsString(extObject));\n        } catch (IOException e) {\n            throw new MojoExecutionException(\n                    \"Failed to persist \" + output.resolve(BootstrapConstants.QUARKUS_EXTENSION_JSON_FILE_NAME), e);\n        }\n    }\n\n    private void recordDevModeConfig(Properties props) {\n        if (devMode == null) {\n            return;\n        }\n        var jvmArgs = devMode.getJvmOptions();\n        if (jvmArgs != null && !jvmArgs.isEmpty()) {\n            jvmArgs.setAsExtensionDevModeProperties(props);\n        }\n        jvmArgs = devMode.getXxJvmOptions();\n        if (jvmArgs != null && !jvmArgs.isEmpty()) {\n            jvmArgs.setAsExtensionDevModeProperties(props);\n        }\n        if (devMode.hasLockedXxJvmOptions()) {\n            props.setProperty(BootstrapConstants.EXT_DEV_MODE_LOCK_XX_JVM_OPTIONS,","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java#L376-L412","documentation":"Immediately after writing quarkus-extension.json, ExtensionDescriptorMojo writes the human-readable quarkus-extension.properties (QUARKUS_EXTENSION_JSON_FILE_NAME is the JSON variant at this site) using the non-pretty mapper. An IOException while writing that file is wrapped in a MojoExecutionException naming the file path.","triggerScenarios":"Files.newBufferedWriter or the write of the JSON file throws IOException during the extension-descriptor goal — same root causes as the sibling persist failures (disk, permissions, locked files).","commonSituations":"Read-only target/ in container builds; NFS stale handles on CI; disk quota exhausted mid-build after earlier files were written successfully.","solutions":["Run mvn clean and retry the build","Check disk space and permissions on target/classes/META-INF","Exclude target/ from antivirus/indexing tools that can lock files"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"Path out = targetDir.resolve(\"classes/META-INF\");\nFiles.createDirectories(out);\nif (!Files.isWritable(out)) throw new IllegalStateException(\"META-INF not writable\");","typeGuard":null,"tryCatchPattern":"try {\n  invoker.executeMaven(\"extension-descriptor\");\n} catch (MojoExecutionException e) {\n  if (String.valueOf(e.getCause()).contains(\"quarkus-extension.properties\")) { runMaven(\"clean\"); retry(); }\n  else throw e;\n}","preventionTips":["Monitor CI disk usage; persist failures often follow quota exhaustion","Clean stale target state after failed builds","Fix mount permissions for containerized builds","Check NFS health for network-mounted workspaces"],"tags":["maven-plugin","io","json","filesystem"],"backgroundTag":"file-write-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"}