quarkusio/quarkus · error · GradleException
e.getMessage()
Error message
e.getMessage()
What it means
Thrown by ExtensionDescriptorTask.generateQuarkusExtensionDescriptor when ExtensionMetadataValidator.validate(extObject) raises an IOException. The rethrown GradleException propagates the validator's message and cause, so this fires when the generated extension descriptor object fails schema/content validation.
Source
Thrown at devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/tasks/ExtensionDescriptorTask.java:357
extObject = readExtensionFile(extensionFile.toPath(), mapper);
} else {
extObject = mapper.createObjectNode();
}
computeArtifactCoords(extObject);
computeProjectName(extObject);
computeSourceLocation(extObject);
computeQuarkusCoreVersion(extObject);
computeQuarkusExtensions(extObject);
if (!extObject.has("description") && projectInfo.containsKey("description")) {
extObject.put("description", projectInfo.get("description"));
}
try {
ExtensionMetadataValidator.validate(extObject);
} catch (IOException e) {
throw new GradleException(e.getMessage(), e.getCause());
}
final DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();
prettyPrinter.indentArraysWith(DefaultIndenter.SYSTEM_LINEFEED_INSTANCE);
try (BufferedWriter bw = Files
.newBufferedWriter(outputMetaInfDirectory.resolve(BootstrapConstants.QUARKUS_EXTENSION_FILE_NAME))) {
bw.write(getMapper().writer().with(prettyPrinter).writeValueAsString(extObject));
} catch (IOException e) {
throw new GradleException(
"Failed to persist " + outputMetaInfDirectory.resolve(BootstrapConstants.QUARKUS_EXTENSION_FILE_NAME), e);
}
ObjectMapper jsonMapper = getJsonMapper();
try (BufferedWriter bw = Files
.newBufferedWriter(outputMetaInfDirectory.resolve(BootstrapConstants.QUARKUS_EXTENSION_JSON_FILE_NAME))) {
bw.write(jsonMapper.writer().with(prettyPrinter).writeValueAsString(extObject));
} catch (IOException e) {View on GitHub (pinned to e1c734241f)
Solutions
- Read the cause chain of the GradleException for the validator's specific complaint and fix that field in the extension's build.gradle or metadata files.
- Ensure required descriptor fields (name, description, extension metadata keys) are present in the project configuration.
- Compare against a known-good Quarkus extension's descriptor configuration and update to current plugin expectations after version upgrades.
Example fix
// before
quarkusExt { description = null }
// after
quarkusExt {
description = 'My Quarkus extension'
}/ Defensive patterns
Strategy: validation
Validate before calling
// pre-check required descriptor fields before running the task
if (!project.description) throw new IllegalStateException("Project '${project.name}' has no description — required by ExtensionMetadataValidator")
def ext = project.extensions.findByName('quarkusExt')
assert ext?.name : 'quarkusExt.name must be set' Try / catch
try {
extensionDescriptorTask.generateQuarkusExtensionDescriptor()
} catch (GradleException e) {
logger.error("Descriptor validation failed: ${e.cause?.message}")
throw e // fix the field named by the cause, then rerun
} Prevention
- Always set project description, name, and metadata fields in extension build scripts.
- After upgrading the Quarkus Gradle plugin, review validator changes for new required fields.
- Compare your extension's descriptor config against a current reference extension.
- Run validateExtension/extensionDescriptor locally before CI.
When it happens
Trigger: The assembled extObject (built from project info, extension metadata, and dependency data) violates rules enforced by ExtensionMetadataValidator — e.g. missing required fields like name/description/metadata entries or malformed values.
Common situations: An extension project with missing/empty project description or incomplete quarkus-extension metadata, renamed properties after a Quarkus upgrade, or custom build logic producing an extObject missing required keys.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Manifest entry name ${key} is invalid. " characters are not
- Manifest section name + section + is invalid. " characters a
- Manifest entry name + key + is invalid. " characters are not
- Failed to parse removed resource '
- Failed to persist extension descriptor
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/ae1b853f73577dcc.
Report an issue: GitHub.