{"record":{"id":"0d6907638f280475","repo":"GoogleContainerTools/jib","slug":"invalid-containerizing-mode","errorCode":null,"errorMessage":"Invalid containerizing mode","messagePattern":"Invalid containerizing mode","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/skaffold/SyncMapTask.java","lineNumber":80,"sourceCode":"      // TODO: move these shared checks with SyncMapMojo into plugins-common\n      if (projectProperties.isWarProject()) {\n        throw new GradleException(\n            \"Skaffold sync is currently only available for 'jar' style Jib projects, but the project \"\n                + getProject().getName()\n                + \" is configured to generate a 'war'\");\n      }\n      try {\n        if (!ContainerizingMode.EXPLODED.equals(\n            ContainerizingMode.from(jibExtension.getContainerizingMode()))) {\n          throw new GradleException(\n              \"Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of \"\n                  + getProject().getName()\n                  + \" is '\"\n                  + jibExtension.getContainerizingMode()\n                  + \"'\");\n        }\n      } catch (InvalidContainerizingModeException ex) {\n        throw new GradleException(\"Invalid containerizing mode\", ex);\n      }\n\n      try {\n        String syncMapJson =\n            PluginConfigurationProcessor.getSkaffoldSyncMap(\n                configuration,\n                projectProperties,\n                jibExtension.getSkaffold().getSync().getExcludes());\n\n        System.out.println();\n        System.out.println(\"BEGIN JIB JSON: SYNCMAP/1\");\n        System.out.println(syncMapJson);\n\n      } catch (Exception ex) {\n        throw new GradleException(\"Failed to generate a Jib file map for sync with Skaffold\", ex);\n      }\n    }\n  }","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/skaffold/SyncMapTask.java#L62-L98","documentation":"ContainerizingMode.from(...) throws InvalidContainerizingModeException when the configured string is not a known mode; SyncMapTask converts that into a GradleException('Invalid containerizing mode', ex). It is a wrapper so the raw enum-parse failure surfaces as a build-script error.","triggerScenarios":"Setting jib.containerizingMode (or containerizingMode property) to a misspelled or invalid string such as 'explode', 'Exploded', or 'packaged ' with stray whitespace, then running the Skaffold sync map task.","commonSituations":"Typos in build.gradle or in passed -P properties; case-sensitivity mistakes; values copied from Maven docs that don't match the Gradle extension's accepted strings.","solutions":["Set containerizingMode to exactly 'exploded' or 'packaged' (lowercase, no whitespace).","Check the cause exception in the Gradle output for the offending value.","Validate any property-driven mode value before it reaches the jib extension.","Upgrade the plugin if the mode string you used is from newer Jib docs than your plugin version."],"exampleFix":"// before\njib { containerizingMode = 'Exploded' }\n// after\njib { containerizingMode = 'exploded' }","handlingStrategy":"validation","validationCode":"def mode = jib.containerizingMode.get()\nassert mode in ['exploded', 'packaged'] : \"Invalid containerizingMode: $mode\"","typeGuard":null,"tryCatchPattern":"try {\n  jib.containerizingMode = providers.gradleProperty('jib.containerizingMode').orElse('exploded')\n} catch (Exception ignored) { }","preventionTips":["Use lowercase literal values 'exploded'/'packaged'.","Trim whitespace from property-driven values.","Match plugin version to documentation for accepted modes."],"tags":["skaffold","gradle","invalid-enum","containerizing-mode"],"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"}