quarkusio/quarkus · error · GradleException

Manifest entry name + key + is invalid. " characters are not

Error message

Manifest entry name + key + is invalid. " characters are not allowed.

What it means

Thrown by AbstractQuarkusExtension.toManifestSectionAttributeKey() when the manifest ENTRY key within a configured section contains a double-quote character. Like section names, the entry key is interpolated into a property key and quotes are not allowed.

Source

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

    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 attribute (entry) key
  2. Keep quotes only in the value part, never in key names
  3. Validate programmatically generated keys before setting them in config

Example fix

// before
quarkus.package.jar.manifest.sections."My-Section"."Bad\"Key"=value
// after
quarkus.package.jar.manifest.sections."My-Section"."Good-Key"=value
Defensive patterns

Strategy: validation

Validate before calling

fun requireNoQuoteEntryKey(key: String) {
  require('"' !in key) { "Manifest entry key must not contain quotes: $key" }
}

Type guard

def isSafeSectionEntry(section: String, key: String): Boolean =
  !section.contains('"') && !key.contains('"')

Try / catch

try { quarkusBuildTask.configureManifest() } catch (e: GradleException) {
  if (e.message?.startsWith("Manifest entry name") == true &&
      e.message?.contains("characters are not allowed") == true) {
    logger.error("Remove quotes from manifest section entry keys")
  } else throw e
}

Prevention

When it happens

Trigger: Configuring quarkus.package.jar.manifest.sections.<section> with an attribute key containing '"', evaluated when constructing the nested manifest section property keys.

Common situations: Typos with quotes in application.properties; generated attribute keys from unvalidated input; mistaken belief that quotes are needed around values (quotes belong in values, not keys).

Related errors


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