GoogleContainerTools/jib · error · MojoExecutionException

invalid value for <containerizingMode>: <invalidContainerizi

Error message

invalid value for <containerizingMode>: <invalidContainerizingMode>

What it means

Jib validates <container><containerizingMode>, which controls how the application is packaged in the image (e.g. 'exploded' or 'packaged'). An unrecognized value raises InvalidContainerizingModeException, wrapped here into a MojoExecutionException that echoes the invalid mode string.

Source

Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java:125

      GlobalConfig globalConfig = GlobalConfig.readConfig();
      updateCheckFuture = MojoCommon.newUpdateChecker(projectProperties, globalConfig, getLog());

      PluginConfigurationProcessor.createJibBuildRunnerForRegistryImage(
              new MavenRawConfiguration(this),
              new MavenSettingsServerCredentials(
                  getSession().getSettings(), getSettingsDecrypter()),
              projectProperties,
              globalConfig,
              new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))
          .runBuild();

    } catch (InvalidAppRootException ex) {
      throw new MojoExecutionException(
          "<container><appRoot> is not an absolute Unix-style path: " + ex.getInvalidPathValue(),
          ex);

    } catch (InvalidContainerizingModeException ex) {
      throw new MojoExecutionException(
          "invalid value for <containerizingMode>: " + ex.getInvalidContainerizingMode(), ex);

    } catch (InvalidWorkingDirectoryException ex) {
      throw new MojoExecutionException(
          "<container><workingDirectory> is not an absolute Unix-style path: "
              + ex.getInvalidPathValue(),
          ex);
    } catch (InvalidPlatformException ex) {
      throw new MojoExecutionException(
          "<from><platforms> contains a platform configuration that is missing required values or has invalid values: "
              + ex.getMessage()
              + ": "
              + ex.getInvalidPlatform(),
          ex);
    } catch (InvalidContainerVolumeException ex) {
      throw new MojoExecutionException(
          "<container><volumes> is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);

View on GitHub (pinned to fb949e2676)

Solutions

  1. Set <containerizingMode> to a supported value, exactly: 'exploded' or 'packaged' (lowercase).
  2. Remove the element to use the default mode.
  3. Check the Jib version's supported modes in its documentation if a previously working value now fails.

Example fix

<!-- before -->
<containerizingMode>Exploded</containerizingMode>
<!-- after -->
<containerizingMode>exploded</containerizingMode>
Defensive patterns

Strategy: validation

Validate before calling

Set<String> modes = Set.of("exploded", "packaged");
String mode = System.getProperty("jib.containerize", pomMode);
if (mode != null && !modes.contains(mode)) {
  throw new IllegalArgumentException("<containerizingMode> must be one of " + modes + ", got: " + mode);
}

Try / catch

catch (MojoExecutionException e) { if (e.getMessage().contains("containerizingMode")) { /* use 'exploded' or 'packaged' */ } }

Prevention

When it happens

Trigger: Setting <containerizingMode> to anything other than the supported values (e.g. 'Exploded', 'war', 'layers', or a typo like 'explode') via pom.xml or -Djib.containerize.

Common situations: Misremembering the mode name for exploded WAR/jar layouts; copying config from a Jib version that supported a different mode set; case sensitivity mistakes.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06). Data as JSON: /api/errors/59e6669d9545b4a0. Report an issue: GitHub.