{"record":{"id":"4d5f3a60204efcdd","repo":"GoogleContainerTools/jib","slug":"invalid-containerizing-mode-4d5f3a","errorCode":null,"errorMessage":"Invalid containerizing mode","messagePattern":"Invalid containerizing mode","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/SyncMapMojo.java","lineNumber":74,"sourceCode":"      throw new MojoExecutionException(\n          \"Skaffold sync is currently only available for 'jar' style Jib projects, but the packaging of \"\n              + getProject().getArtifactId()\n              + \" is '\"\n              + getProject().getPackaging()\n              + \"'\");\n    }\n    // add check for exploded containerization\n    try {\n      if (!ContainerizingMode.EXPLODED.equals(ContainerizingMode.from(getContainerizingMode()))) {\n        throw new MojoExecutionException(\n            \"Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of \"\n                + getProject().getArtifactId()\n                + \" is '\"\n                + getContainerizingMode()\n                + \"'\");\n      }\n    } catch (InvalidContainerizingModeException ex) {\n      throw new MojoExecutionException(\"Invalid containerizing mode\", ex);\n    }\n\n    try (TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider()) {\n      MavenProjectProperties projectProperties =\n          MavenProjectProperties.getForProject(\n              Preconditions.checkNotNull(descriptor),\n              getProject(),\n              getSession(),\n              getLog(),\n              tempDirectoryProvider,\n              getInjectedPluginExtensions());\n\n      MavenRawConfiguration configuration = new MavenRawConfiguration(this);\n\n      try {\n        String syncMapJson =\n            PluginConfigurationProcessor.getSkaffoldSyncMap(\n                configuration,","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/SyncMapMojo.java#L56-L92","documentation":"When validating the containerizing mode, SyncMapMojo calls ContainerizingMode.from(getContainerizingMode()), which throws InvalidContainerizingModeException for unrecognized mode strings. The mojo wraps it in this generic MojoExecutionException 'Invalid containerizing mode'. It means the configured mode string is not one of the known values (exploded, packaged).","triggerScenarios":"jib.containerizeMode (property or <containerizingMode> config) is set to a value other than 'exploded' or 'packaged', e.g. a typo like 'exploted' or 'war'.","commonSituations":"Typo in pom.xml or in -Djib.containerizeMode; older plugin versions that don't recognize a newly introduced mode value; documentation copied from Gradle with different mode names.","solutions":["Correct the value to exactly 'exploded' or 'packaged' in the plugin configuration or jib.containerizeMode property.","Check spelling/case against the plugin version's accepted values (run mvn jib:help -Dgoal=build or read docs for that version).","Upgrade jib-maven-plugin if you need a mode value introduced in a newer release.","Remove the containerizingMode setting entirely to use the default (exploded)."],"exampleFix":"// before\n<containerizingMode>exploted</containerizingMode>\n// after\n<containerizingMode>exploded</containerizingMode>","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"exploded\", \"packaged\");\nString mode = System.getProperty(\"jib.containerizeMode\", \"\");\nif (!mode.isEmpty() && !valid.contains(mode)) throw new IllegalStateException(\"containerizingMode must be one of \" + valid);","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { if (e.getMessage().equals(\"Invalid containerizing mode\")) { /* fix the jib.containerizeMode value to exploded|packaged */ } }","preventionTips":["Use only documented values: exploded or packaged","Check spelling when setting containerizingMode in pom.xml or -D flags","Match the mode names to your exact plugin version (older versions accept fewer values)","Run mvn jib:help or check docs for the version you pin"],"tags":["maven","skaffold","containerizing-mode","typo"],"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"}