{"record":{"id":"a24389da176a18a9","repo":"quarkusio/quarkus","slug":"manifest-entry-name-key-is-invalid-character","errorCode":null,"errorMessage":"Manifest entry name ${key} is invalid. \" characters are not allowed.","messagePattern":"Manifest entry name (.+?) is invalid\\. \" characters are not allowed\\.","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/AbstractQuarkusExtension.java","lineNumber":175,"sourceCode":"            // gradleProperty instead of Project.getProperties().get(...), which is not allowed under\n            // Isolated Projects.\n            profile = project.getProviders().gradleProperty(QUARKUS_PROFILE).getOrNull();\n        }\n        if (profile == null) {\n            profile = \"prod\";\n        }\n        return profile;\n    }\n\n    private static FileCollection dependencyClasspath(SourceSet mainSourceSet) {\n        return mainSourceSet.getCompileClasspath().plus(mainSourceSet.getRuntimeClasspath())\n                .plus(mainSourceSet.getAnnotationProcessorPath())\n                .plus(mainSourceSet.getResources());\n    }\n\n    protected static String toManifestAttributeKey(String key) {\n        if (key.contains(\"\\\"\")) {\n            throw new GradleException(\"Manifest entry name \" + key + \" is invalid. \\\" characters are not allowed.\");\n        }\n        return String.format(\"%s.\\\"%s\\\"\", MANIFEST_ATTRIBUTES_PROPERTY_PREFIX, key);\n    }\n\n    protected static String toManifestSectionAttributeKey(String section, String key) {\n        if (section.contains(\"\\\"\")) {\n            throw new GradleException(\"Manifest section name \" + section + \" is invalid. \\\" characters are not allowed.\");\n        }\n        if (key.contains(\"\\\"\")) {\n            throw new GradleException(\"Manifest entry name \" + key + \" is invalid. \\\" characters are not allowed.\");\n        }\n        return String.format(\"%s.\\\"%s\\\".\\\"%s\\\"\", MANIFEST_SECTIONS_PROPERTY_PREFIX, section,\n                key);\n    }\n}\n","sourceCodeStart":157,"sourceCodeEnd":191,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/AbstractQuarkusExtension.java#L157-L191","documentation":"Thrown by AbstractQuarkusExtension.toManifestAttributeKey() when a manifest attribute key configured via quarkus.package.jar.manifest.attributes contains a double-quote character. Quotes are illegal in manifest entry names because the property key is interpolated into a Gradle property name pattern.","triggerScenarios":"Defining a manifest attribute whose name includes '\"', e.g. quarkus.package.jar.manifest.attributes.\"Some\\\"Key\"=value, which is passed to toManifestAttributeKey during manifest configuration.","commonSituations":"Copy-pasting manifest attribute names with quoting typos; building property names dynamically from untrusted/user input containing quotes; YAML/properties escaping mistakes in application.properties.","solutions":["Remove the double-quote character from the manifest attribute key","Sanitize/validate user- or environment-supplied attribute names before passing them to Quarkus config","Use valid JAR manifest attribute names (alphanumeric, dash, underscore) per the Jar file specification"],"exampleFix":"// before\nquarkus.package.jar.manifest.attributes.\"My\\\"Attr\"=value\n// after\nquarkus.package.jar.manifest.attributes.\"My-Attr\"=value","handlingStrategy":"validation","validationCode":"fun requireNoQuote(key: String) {\n  require('\"' !in key) { \"Manifest attribute key must not contain quotes: $key\" }\n}","typeGuard":"def isSafeManifestKey(s: String): Boolean = s != null && !s.contains('\"')","tryCatchPattern":"try { quarkusBuildTask.configureManifest() } catch (e: GradleException) {\n  if (e.message?.startsWith(\"Manifest entry name\") == true) {\n    logger.error(\"Fix quoted manifest attribute key in quarkus.package.jar.manifest.attributes\")\n  } else throw e\n}","preventionTips":["Never put quotes in manifest attribute key names","Validate generated keys before writing them to application.properties","Follow the JAR manifest spec for attribute names"],"tags":["gradle","manifest","validation"],"backgroundTag":"invalid-manifest-attribute-name","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}