{"record":{"id":"a70a767b5b8b7c7e","repo":"GoogleContainerTools/jib","slug":"rawmode","errorCode":null,"errorMessage":"${rawMode}","messagePattern":"\\$\\{rawMode\\}","errorType":"validation","errorClass":"InvalidContainerizingModeException","httpStatus":null,"severity":"error","filePath":"jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/ContainerizingMode.java","lineNumber":45,"sourceCode":" * </ul>\n */\npublic enum ContainerizingMode {\n  EXPLODED,\n  PACKAGED;\n\n  /**\n   * Converts a string representation of ContainerizingMode to Enum. It requires an all lowercase\n   * string that matches the enum value exactly.\n   *\n   * @param rawMode the raw string to parse\n   * @return the enum equivalent of the mode\n   * @throws InvalidContainerizingModeException when not lowercase, or cannot match to an values of\n   *     this enum class\n   */\n  public static ContainerizingMode from(String rawMode) throws InvalidContainerizingModeException {\n    try {\n      if (!rawMode.toLowerCase(Locale.US).equals(rawMode)) {\n        throw new InvalidContainerizingModeException(rawMode, rawMode);\n      }\n      return ContainerizingMode.valueOf(rawMode.toUpperCase(Locale.US));\n    } catch (IllegalArgumentException ex) {\n      throw new InvalidContainerizingModeException(rawMode, rawMode);\n    }\n  }\n}\n","sourceCodeStart":27,"sourceCodeEnd":53,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/ContainerizingMode.java#L27-L53","documentation":"ContainerizingMode.from parses the `containerizingMode` configuration value (e.g. for exploded Docker builds). If the raw string is not entirely lowercase (the mode must be lowercase), it immediately throws InvalidContainerizingModeException with the raw value in the message. Valid values are the enum names lowercased, e.g. `exploded` and `packaged`.","triggerScenarios":"Setting `containerizingMode = \"Exploded\"` or `\"PACKAGED\"` (any uppercase letters) via Gradle/Maven config or the `jib.containerizingMode` property.","commonSituations":"Copy-pasting an enum name in CamelCase or uppercase from docs/source into build configuration.","solutions":["Use the all-lowercase value: `containerizingMode = \"exploded\"`.","Valid modes: `exploded` (default) and `packaged`; pick one of those exactly.","Check pom.xml/build.gradle for a leftover uppercase value and fix it."],"exampleFix":"// before\njib { containerizingMode = \"Exploded\" }\n// after\njib { containerizingMode = \"exploded\" }","handlingStrategy":"validation","validationCode":"// validate the mode is a known lowercase value before building\nconst modes = ['exploded', 'packaged'];\nif (!modes.includes(containerizingMode)) throw new Error('mode must be one of ' + modes);\n","typeGuard":null,"tryCatchPattern":"try { jibBuild() } catch (InvalidContainerizingModeException e) {\n  // normalize and retry\n  mode = mode.toLowerCase(Locale.ROOT);\n}","preventionTips":["Only use lowercase enum names from the docs (exploded, packaged)","Never copy enum constant names (CamelCase/UPPERCASE) into config","Validate config values in CI before invoking Jib"],"tags":["configuration","enum","jib","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}