GoogleContainerTools/jib · error · MojoExecutionException
Invalid containerizing mode
Error message
Invalid containerizing mode
What it means
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).
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/SyncMapMojo.java:74
throw new MojoExecutionException(
"Skaffold sync is currently only available for 'jar' style Jib projects, but the packaging of "
+ getProject().getArtifactId()
+ " is '"
+ getProject().getPackaging()
+ "'");
}
// add check for exploded containerization
try {
if (!ContainerizingMode.EXPLODED.equals(ContainerizingMode.from(getContainerizingMode()))) {
throw new MojoExecutionException(
"Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of "
+ getProject().getArtifactId()
+ " is '"
+ getContainerizingMode()
+ "'");
}
} catch (InvalidContainerizingModeException ex) {
throw new MojoExecutionException("Invalid containerizing mode", ex);
}
try (TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider()) {
MavenProjectProperties projectProperties =
MavenProjectProperties.getForProject(
Preconditions.checkNotNull(descriptor),
getProject(),
getSession(),
getLog(),
tempDirectoryProvider,
getInjectedPluginExtensions());
MavenRawConfiguration configuration = new MavenRawConfiguration(this);
try {
String syncMapJson =
PluginConfigurationProcessor.getSkaffoldSyncMap(
configuration,View on GitHub (pinned to fb949e2676)
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).
Example fix
// before <containerizingMode>exploted</containerizingMode> // after <containerizingMode>exploded</containerizingMode>
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Set.of("exploded", "packaged");
String mode = System.getProperty("jib.containerizeMode", "");
if (!mode.isEmpty() && !valid.contains(mode)) throw new IllegalStateException("containerizingMode must be one of " + valid); Try / catch
try { ... } catch (MojoExecutionException e) { if (e.getMessage().equals("Invalid containerizing mode")) { /* fix the jib.containerizeMode value to exploded|packaged */ } } Prevention
- 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
When it happens
Trigger: jib.containerizeMode (property or <containerizingMode> config) is set to a value other than 'exploded' or 'packaged', e.g. a typo like 'exploted' or 'war'.
Common situations: 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.
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
- Skaffold sync is currently only available for Jib projects i
- Skaffold sync is currently only available for Jib projects i
- Invalid containerizing mode
- invalid value for <containerizingMode>: <invalidContainerizi
- Could not determine Jib plugin version
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/4d5f3a60204efcdd.
Report an issue: GitHub.