{"record":{"id":"811a36dde678674e","repo":"GoogleContainerTools/jib","slug":"skaffold-sync-is-currently-only-available-for-jib-811a36","errorCode":null,"errorMessage":"Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of ${getProject().getArtifactId()} is '${getContainerizingMode()}'","messagePattern":"Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of (.+?) is '(.+?)'","errorType":"validation","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/SyncMapMojo.java","lineNumber":66,"sourceCode":"    checkJibVersion();\n    if (MojoCommon.shouldSkipJibExecution(this)) {\n      return;\n    }\n\n    // TODO: move these shared checks with SyncMapTask into plugins-common\n    // add check that means this is only for jars\n    if (!\"jar\".equals(getProject().getPackaging())) {\n      throw new MojoExecutionException(\n          \"Skaffold sync is currently only available for 'jar' style Jib projects, but the packaging of \"\n              + getProject().getArtifactId()\n              + \" is '\"\n              + getProject().getPackaging()\n              + \"'\");\n    }\n    // add check for exploded containerization\n    try {\n      if (!ContainerizingMode.EXPLODED.equals(ContainerizingMode.from(getContainerizingMode()))) {\n        throw new MojoExecutionException(\n            \"Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of \"\n                + getProject().getArtifactId()\n                + \" is '\"\n                + getContainerizingMode()\n                + \"'\");\n      }\n    } catch (InvalidContainerizingModeException ex) {\n      throw new MojoExecutionException(\"Invalid containerizing mode\", ex);\n    }\n\n    try (TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider()) {\n      MavenProjectProperties projectProperties =\n          MavenProjectProperties.getForProject(\n              Preconditions.checkNotNull(descriptor),\n              getProject(),\n              getSession(),\n              getLog(),\n              tempDirectoryProvider,","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/SyncMapMojo.java#L48-L84","documentation":"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'.","triggerScenarios":"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.","commonSituations":"Projects that switched to packaged mode for faster builds and then noticed Skaffold sync fails; copy-pasted Jib config from a non-Skaffold project.","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."],"exampleFix":"// before\n<configuration><containerizingMode>packaged</containerizingMode></configuration>\n// after\n<configuration><containerizingMode>exploded</containerizingMode></configuration>","handlingStrategy":"validation","validationCode":"String mode = System.getProperty(\"jib.containerizeMode\", \"exploded\");\nif (!\"exploded\".equals(mode)) throw new IllegalStateException(\"Skaffold sync requires jib.containerizeMode=exploded\");","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { if (e.getMessage().contains(\"'exploded' containerizing mode\")) { /* set containerizingMode to exploded or drop sync */ } }","preventionTips":["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"],"tags":["maven","skaffold","containerizing-mode","sync"],"backgroundTag":"invalid-enum-value","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}