{"record":{"id":"55a0124d35adbaca","repo":"GoogleContainerTools/jib","slug":"unknown-containerizing-mode-containerizingmode","errorCode":null,"errorMessage":"unknown containerizing mode: ${containerizingMode}","messagePattern":"unknown containerizing mode: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/GradleProjectProperties.java","lineNumber":279,"sourceCode":"          // Adds class files\n          for (File classesOutputDirectory : classesOutputDirectories) {\n            javaContainerBuilder.addClasses(classesOutputDirectory.toPath());\n          }\n          if (classesOutputDirectories.isEmpty()) {\n            log(LogEvent.warn(\"No classes files were found - did you compile your project?\"));\n          }\n          break;\n\n        case PACKAGED:\n          // Add a JAR\n          Jar jarTask = (Jar) project.getTasks().findByName(\"jar\");\n          Path jarPath = jarTask.getArchiveFile().get().getAsFile().toPath();\n          log(LogEvent.debug(\"Using JAR: \" + jarPath));\n          javaContainerBuilder.addToClasspath(jarPath);\n          break;\n\n        default:\n          throw new IllegalStateException(\"unknown containerizing mode: \" + containerizingMode);\n      }\n\n      return javaContainerBuilder.toContainerBuilder();\n\n    } catch (IOException ex) {\n      throw new GradleException(\"Obtaining project build output files failed\", ex);\n    }\n  }\n\n  @Override\n  public List<Path> getClassFiles() throws IOException {\n    // TODO: Consolidate with createJibContainerBuilder\n    FileCollection classesOutputDirectories =\n        getMainSourceSet().getOutput().getClassesDirs().filter(File::exists);\n    List<Path> classFiles = new ArrayList<>();\n    for (File classesOutputDirectory : classesOutputDirectories) {\n      classFiles.addAll(new DirectoryWalker(classesOutputDirectory.toPath()).walk());\n    }","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/GradleProjectProperties.java#L261-L297","documentation":"GradleProjectProperties.createJibContainerBuilder switches on the configured containerizingMode and hits the default branch, throwing IllegalStateException('unknown containerizing mode: ...'). Jib only supports the modes exposed by ContainerizingMode (currently 'exploded' and 'packaged'); any other value fails here.","triggerScenarios":"Setting jib.containerizingMode (or the project property jib.containerizingMode) to a typo or unsupported value such as 'packaed', 'explode', or 'war' in a Gradle project, then invoking a task that builds the container builder.","commonSituations":"Typo in build.gradle or -Pjib.containerizingMode on the command line; copying a Maven-only mode value; older Jib plugin version that predates a mode value used in docs.","solutions":["Set containerizingMode to exactly 'exploded' or 'packaged'","Check the value with ./gradlew -Pjib.containerizingMode=... for typos; prefer the DSL: jib { containerizingMode = 'packaged' }","Upgrade jib-gradle-plugin if a newer documented mode is needed"],"exampleFix":"// before\njib { containerizingMode = 'explode' }\n// after\njib { containerizingMode = 'exploded' }","handlingStrategy":"validation","validationCode":"def mode = jib.containerizingMode.getOrElse('exploded')\nassert mode in ['exploded', 'packaged'] : \"unsupported containerizingMode: $mode\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the DSL property (jib { containerizingMode = ... }) instead of ad-hoc -P flags to get editor validation","Only use mode values from the Jib documentation for your plugin version","Upgrade the plugin before adopting newly documented modes"],"tags":["jib","gradle","enum-value","configuration"],"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"}