quarkusio/quarkus · error · GradleException

Manifest section name + section + is invalid. " characters a

Error message

Manifest section name + section + is invalid. " characters are not allowed.

What it means

Thrown by AbstractQuarkusExtension.toManifestSectionAttributeKey() when a manifest SECTION name configured under quarkus.package.jar.manifest.sections contains a double-quote character. Section names are interpolated into nested Gradle property keys, so quotes are rejected.

Source

Thrown at devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/AbstractQuarkusExtension.java:182

        return profile;
    }

    private static FileCollection dependencyClasspath(SourceSet mainSourceSet) {
        return mainSourceSet.getCompileClasspath().plus(mainSourceSet.getRuntimeClasspath())
                .plus(mainSourceSet.getAnnotationProcessorPath())
                .plus(mainSourceSet.getResources());
    }

    protected static String toManifestAttributeKey(String key) {
        if (key.contains("\"")) {
            throw new GradleException("Manifest entry name " + key + " is invalid. \" characters are not allowed.");
        }
        return String.format("%s.\"%s\"", MANIFEST_ATTRIBUTES_PROPERTY_PREFIX, key);
    }

    protected static String toManifestSectionAttributeKey(String section, String key) {
        if (section.contains("\"")) {
            throw new GradleException("Manifest section name " + section + " is invalid. \" characters are not allowed.");
        }
        if (key.contains("\"")) {
            throw new GradleException("Manifest entry name " + key + " is invalid. \" characters are not allowed.");
        }
        return String.format("%s.\"%s\".\"%s\"", MANIFEST_SECTIONS_PROPERTY_PREFIX, section,
                key);
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Remove the double-quote from the section name
  2. Validate/escape section names before they reach Quarkus configuration
  3. Use spec-compliant JAR manifest section names (e.g. alpha-numeric or dotted names)

Example fix

// before
quarkus.package.jar.manifest.sections."My\"Section".foo=bar
// after
quarkus.package.jar.manifest.sections."My-Section".foo=bar
Defensive patterns

Strategy: validation

Validate before calling

fun requireNoQuoteSection(section: String) {
  require('"' !in section) { "Manifest section name must not contain quotes: $section" }
}

Type guard

def isSafeManifestSection(s: String): Boolean = s != null && !s.contains('"')

Try / catch

try { quarkusBuildTask.configureManifest() } catch (e: GradleException) {
  if (e.message?.startsWith("Manifest section name") == true) {
    logger.error("Fix quoted section name in quarkus.package.jar.manifest.sections")
  } else throw e
}

Prevention

When it happens

Trigger: Configuring quarkus.package.jar.manifest.sections with a section name containing '"' (e.g. sections."Sec\"tion".<attr>=value), evaluated when building the manifest sections property keys.

Common situations: Dynamic section names built from input containing quotes; typos with stray quotes in application.properties; programmatic manifest section generation from unvalidated data.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/2c18d3b78fe9c64b. Report an issue: GitHub.