{"record":{"id":"2ad71821dc4cf243","repo":"quarkusio/quarkus","slug":"failed-to-persist-output-resolve-bootstrapconsta","errorCode":null,"errorMessage":"Failed to persist ${output.resolve(BootstrapConstants.QUARKUS_EXTENSION_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":386,"sourceCode":"        addSource(extObject);\n        addExtensionDependencies(extObject);\n\n        completeCodestartArtifact(mapper, extObject);\n\n        try {\n            ExtensionMetadataValidator.validate(extObject);\n        } catch (IOException e) {\n            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()) {","sourceCodeStart":368,"sourceCodeEnd":404,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java#L368-L404","documentation":"ExtensionDescriptorMojo writes the generated quarkus-extension.json descriptor via Files.newBufferedWriter and Jackson writer. An IOException while opening/writing this file is wrapped in a MojoExecutionException naming the quarkus-extension.json path inside META-INF.","triggerScenarios":"Files.newBufferedWriter or bw.write throws IOException — the META-INF directory was not created/readable, the target file is locked, disk is full, or permissions deny writing.","commonSituations":"CI disk full; read-only volume mounts; antivirus or container runtimes locking files in target; concurrent builds racing on the same target directory.","solutions":["Run mvn clean and rebuild to reset target state","Check disk space and file permissions on the module's target/classes/META-INF directory","Ensure no concurrent build writes to the same module (no parallel -T runs of the same reactor)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"Path out = targetDir.resolve(\"classes/META-INF\");\nif (!Files.isDirectory(out) || !Files.isWritable(out)) throw new IllegalStateException(\"META-INF not writable: \" + out);","typeGuard":null,"tryCatchPattern":"try {\n  invoker.executeMaven(\"extension-descriptor\");\n} catch (MojoExecutionException e) {\n  if (String.valueOf(e.getCause()).contains(\"quarkus-extension.json\")) { runMaven(\"clean\"); retry(); }\n  else throw e;\n}","preventionTips":["Ensure target/classes/META-INF is created (the mojo does it, but permissions must allow it)","Free disk space before large reactor builds","Exclude target/ from file lockers (AV, sync clients)","Serialize builds that share a working tree"],"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-14T00:17:10.932Z"}