GoogleContainerTools/jib · error · MojoExecutionException
Skaffold sync is currently only available for Jib projects i
Error message
Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of ${getProject().getArtifactId()} is '${getContainerizingMode()}' What it means
Skaffold sync via SyncMapMojo additionally requires Jib's containerizing mode to be 'exploded', because the sync map is computed against the exploded WAR/jar layout. The mojo parses the configured containerizingMode (jib.containerizeMode property/config) and throws this MojoExecutionException if it is 'packaged' or otherwise not 'exploded'.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/SyncMapMojo.java:66
checkJibVersion();
if (MojoCommon.shouldSkipJibExecution(this)) {
return;
}
// TODO: move these shared checks with SyncMapTask into plugins-common
// add check that means this is only for jars
if (!"jar".equals(getProject().getPackaging())) {
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,View on GitHub (pinned to fb949e2676)
Solutions
- Set containerizing mode to exploded: <containerizingMode>exploded</containerizingMode> in the jib-maven-plugin configuration (or omit it, as exploded is the default).
- Remove -Djib.containerizeMode=packaged from the build command/CI if Skaffold dev sync is used.
- If packaged mode is required, disable Skaffold sync for this project and rely on full rebuilds.
- Sync in packaged mode requires upgrading: check Jib releases for changed sync constraints, or use Skaffold's rebuild strategy.
Example fix
// before <configuration><containerizingMode>packaged</containerizingMode></configuration> // after <configuration><containerizingMode>exploded</containerizingMode></configuration>
Defensive patterns
Strategy: validation
Validate before calling
String mode = System.getProperty("jib.containerizeMode", "exploded");
if (!"exploded".equals(mode)) throw new IllegalStateException("Skaffold sync requires jib.containerizeMode=exploded"); Try / catch
try { ... } catch (MojoExecutionException e) { if (e.getMessage().contains("'exploded' containerizing mode")) { /* set containerizingMode to exploded or drop sync */ } } Prevention
- Leave containerizingMode at its default (exploded) on projects using Skaffold sync
- Audit CI flags for -Djib.containerizeMode=packaged
- Document that packaged mode is incompatible with Skaffold file sync
When it happens
Trigger: Running skaffold-sync on a jar project whose containerizing mode resolves to anything other than EXPLODED, e.g. <containerizingMode>packaged</containerizingMode> in the jib plugin configuration or -Djib.containerizeMode=packaged.
Common situations: Projects that switched to packaged mode for faster builds and then noticed Skaffold sync fails; copy-pasted Jib config from a non-Skaffold project.
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 'jar' style Ji
- Invalid containerizing mode
- Skaffold sync is currently only available for Jib projects i
- Invalid containerizing mode
- invalid value for <containerizingMode>: <invalidContainerizi
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/811a36dde678674e.
Report an issue: GitHub.