GoogleContainerTools/jib · error · MojoExecutionException
invalid value for <containerizingMode>: ${ex.getInvalidConta
Error message
invalid value for <containerizingMode>: ${ex.getInvalidContainerizingMode()} What it means
Jib validates <containerizingMode> and throws InvalidContainerizingModeException for unrecognized values; BuildDockerMojo maps it to MojoExecutionException listing the invalid value. Only modes known to the plugin (e.g. 'exploded', 'packaged') are accepted.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java:111
GlobalConfig globalConfig = GlobalConfig.readConfig();
updateCheckFuture = MojoCommon.newUpdateChecker(projectProperties, globalConfig, getLog());
PluginConfigurationProcessor.createJibBuildRunnerForDockerDaemonImage(
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
- Use exactly 'exploded' or 'packaged' for <containerizingMode>.
- Check the exception message for the value Jib saw — a property may be overriding your XML.
- Upgrade jib-maven-plugin if the desired mode is from newer documentation.
- Remove the element to fall back to the default 'packaged' mode.
Example fix
<!-- before --> <containerizingMode>Exploded</containerizingMode> <!-- after --> <containerizingMode>exploded</containerizingMode>
Defensive patterns
Strategy: validation
Validate before calling
<containerizingMode>${jib.containerizingMode}</containerizingMode>
<!-- CI pre-check: value must be 'exploded' or 'packaged' --> Prevention
- Restrict containerizingMode to 'exploded' or 'packaged' in profiles.
- Beware properties overriding pom values with invalid strings.
- Upgrade the plugin when adopting mode values from newer docs.
When it happens
Trigger: Setting <containerizingMode> in the jib-maven-plugin configuration (or the jib.containerizingMode system property) to a misspelled/unknown string, then running jib:dockerBuild.
Common situations: Typos like 'explode' or 'Exploded'; values copied from newer plugin docs while running an older plugin version that doesn't know the mode.
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
- <container><appRoot> is not an absolute Unix-style path: ${e
- <container><appRoot> is not an absolute Unix-style path: <in
- invalid value for <containerizingMode>: <invalidContainerizi
- <container><workingDirectory> is not an absolute Unix-style
- <from><platforms> contains a platform configuration that is
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/8665b95b8416ea50.
Report an issue: GitHub.