{"record":{"id":"f124dc1cce27a5e8","repo":"quarkusio/quarkus","slug":"e-getmessage-f124dc","errorCode":null,"errorMessage":"${e.getMessage()}","messagePattern":"\\$\\{e\\.getMessage\\(\\)\\}","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java","lineNumber":376,"sourceCode":"            }\n        }\n        if (!extObject.has(\"description\") && project.getDescription() != null) {\n            extObject.put(\"description\", project.getDescription());\n        }\n\n        setBuiltWithQuarkusCoreVersion(quarkusCoreVersion, extObject);\n        setRequiresQuarkusCoreVersion(quarkusCoreVersionRange, extObject);\n        addJavaVersion(extObject);\n        addCapabilities(extObject);\n        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(","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java#L358-L394","documentation":"ExtensionDescriptorMojo validates the assembled quarkus-extension.json via ExtensionMetadataValidator.validate(extObject). If validation fails with an IOException, the message of the underlying exception is rethrown as a MojoExecutionException, so the displayed text is whatever the validator reported (e.g. a missing/invalid required metadata field).","triggerScenarios":"The extension descriptor (extension.xml or extension.json) lacks required metadata fields or contains values ExtensionMetadataValidator rejects, and the module executes the extension descriptor goal without skipping validation.","commonSituations":"Hand-edited extension.json missing required keys; metadata.name/description/categories empty; migrating an extension from an older descriptor format; typos in metadata fields after upgrading the Quarkus parent.","solutions":["Read e.getMessage()/cause in the full stack trace to see which metadata field failed validation","Fix the offending field in the extension descriptor (extension.xml or extension.json source file)","Compare against a working extension descriptor of the same Quarkus version for required fields"],"exampleFix":"// before (extension.json)\n\"metadata\": { \"categories\": [] }\n// after\n\"metadata\": { \"categories\": [\"data\"], \"short-name\": \"myext\" }","handlingStrategy":"validation","validationCode":"// Validate required metadata fields in extension.json before running the goal\nJsonNode meta = new ObjectMapper().readTree(extensionJson).get(\"metadata\");\nif (meta == null || meta.path(\"categories\").isEmpty() || meta.path(\"short-name\").asText().isEmpty()) {\n  throw new IllegalStateException(\"extension metadata incomplete\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  invoker.executeMaven(\"extension-descriptor\");\n} catch (MojoExecutionException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"metadata\")) { fixDescriptorMetadata(); }\n  throw e;\n}","preventionTips":["Keep extension.json in sync with the schema of your Quarkus parent version","Lint extension.json in CI (jq or JSON schema validation)","Compare required fields against a working extension when upgrading Quarkus","Fix metadata at the source descriptor (extension.xml), not the generated JSON"],"tags":["maven-plugin","validation","json","extension-metadata"],"backgroundTag":"extension-metadata-validation-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"}