quarkusio/quarkus · error · MojoExecutionException
Manifest section name ${section} is invalid. " characters ar
Error message
Manifest section name ${section} is invalid. " characters are not allowed. What it means
QuarkusBootstrapProvider.toManifestSectionAttributeKey encodes a manifest section name and its entry into a property like quarkus.jar.manifest.sections."<section>"."<key>". Because double quotes delimit the parts of that property name, a section name containing a double quote would break the encoding, so it is rejected with a MojoExecutionException.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/QuarkusBootstrapProvider.java:454
referenceValue = projectProperties.getProperty(reference);
if (referenceValue != null) {
effectiveProperties.setProperty(reference, referenceValue);
}
}
}
return effectiveProperties;
}
private String toManifestAttributeKey(String key) throws MojoExecutionException {
if (key.contains("\"")) {
throw new MojoExecutionException("Manifest entry name " + key + " is invalid. \" characters are not allowed.");
}
return String.format("%s.\"%s\"", MANIFEST_ATTRIBUTES_PROPERTY_PREFIX, key);
}
private String toManifestSectionAttributeKey(String section, String key) throws MojoExecutionException {
if (section.contains("\"")) {
throw new MojoExecutionException(
"Manifest section name " + section + " is invalid. \" characters are not allowed.");
}
if (key.contains("\"")) {
throw new MojoExecutionException("Manifest entry name " + key + " is invalid. \" characters are not allowed.");
}
return String.format("%s.\"%s\".\"%s\"", MANIFEST_SECTIONS_PROPERTY_PREFIX, section,
key);
}
protected CuratedApplication bootstrapApplication(QuarkusBootstrapMojo mojo, LaunchMode mode,
Consumer<QuarkusBootstrap.Builder> builderCustomizer) throws MojoExecutionException {
if (mode == LaunchMode.DEVELOPMENT) {
return devApp == null ? devApp = doBootstrap(mojo, mode, builderCustomizer) : devApp;
}
if (mode == LaunchMode.TEST) {
return testApp == null ? testApp = doBootstrap(mojo, mode, builderCustomizer) : testApp;
}
return prodApp == null ? prodApp = doBootstrap(mojo, mode, builderCustomizer) : prodApp;View on GitHub (pinned to e1c734241f)
Solutions
- Remove the double-quote character from the manifest section name in the configuration
- Check the <manifestSections> block in the pom.xml for stray or escaped quotes
- Use a standard JAR manifest section name (e.g. an agent or signing section name without quotes)
- If the name is derived from a Maven property, fix the property value
Example fix
// pom.xml // before <manifestSection> <name>org.example."custom"-section</name> <manifestEntries><Foo>bar</Foo></manifestEntries> </manifestSection> // after <manifestSection> <name>org.example.custom-section</name> <manifestEntries><Foo>bar</Foo></manifestEntries> </manifestSection>
Defensive patterns
Strategy: validation
Validate before calling
// Validate manifest section names before building
String section = manifestSection.getName();
if (section.contains("\"")) {
throw new IllegalArgumentException("Manifest section name '" + section + "' must not contain double quotes");
} Type guard
boolean isValidManifestSectionName(String section) {
return section != null && !section.contains("\"");
} Try / catch
try {
quarkusBuildMojo.execute();
} catch (MojoExecutionException e) {
if (e.getMessage().contains("Manifest section name") && e.getMessage().contains("not allowed")) {
getLog().error("Fix the manifestSection <name> in pom.xml: remove the double-quote character. " + e.getMessage());
} else { throw e; }
} Prevention
- Use standard JAR manifest section naming (no quotes) in manifestSections config
- Never derive section names from unvalidated user input or unchecked Maven properties
- Lint the POM manifestSections block for quote characters
- Code-review any script that generates manifestSection configuration
When it happens
Trigger: A <manifestSections><manifestSection><name>...</name> configuration block contains a " character in the section name; getBuildSystemProperties iterates manifestSections and calls toManifestSectionAttributeKey, which throws on the first quote found in the section name.
Common situations: Copy-pasted section names with stray quotes; generated section names built from user input that included quotes; typos in the pom.xml manifestSections configuration.
Related errors
- Manifest entry name ${key} is invalid. " characters are not
- Unrecognized dependency flag '<trimmed>'. Supported flags: O
- Parameter 'mode' was set to '<mode>' while expected one of '
- Parameter 'mode' was set to '<mode>' while expected one of '
- Parameter 'mode' was set to '<mode>' while expected one of '
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/8ae829b034c33a25.
Report an issue: GitHub.