GoogleContainerTools/jib · error · MojoExecutionException

invalid value for <containerizingMode>: <invalidContainerizi

Error message

invalid value for <containerizingMode>: <invalidContainerizingMode>

What it means

BuildTarMojo.execute throws this when <container><containerizingMode> has a value jib does not recognize. InvalidContainerizingModeException carries the invalid mode; valid values are 'exploded' and 'packaged'.

Source

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

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

      PluginConfigurationProcessor.createJibBuildRunnerForTarImage(
              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 the value to exactly 'exploded' or 'packaged'.
  2. Remove the <containerizingMode> element to use the default ('exploded' for newer jib).
  3. Upgrade jib-maven-plugin if the mode was introduced in a newer release than you use.

Example fix

<!-- before -->
<container><containerizingMode>explode</containerizingMode></container>
<!-- after -->
<container><containerizingMode>exploded</containerizingMode></container>
Defensive patterns

Strategy: validation

Validate before calling

String mode = "explode";
java.util.Set<String> valid = java.util.Set.of("exploded", "packaged");
if (!valid.contains(mode)) throw new IllegalArgumentException("invalid containerizingMode: " + mode);

Try / catch

try { ... } catch (MojoExecutionException e) { if (e.getMessage().startsWith("invalid value for <containerizingMode>")) { /* use exploded|packaged */ } throw e; }

Prevention

When it happens

Trigger: Running 'mvn jib:buildTar' with <containerizingMode> set to a misspelled or unsupported value like 'explode', 'war', or 'fast'.

Common situations: Typos when enabling exploded mode for faster iteration; copying config from blog posts describing old jib versions where the mode name differed.

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/5e166101c1f33161. Report an issue: GitHub.