{"record":{"id":"59666e86210f72e4","repo":"GoogleContainerTools/jib","slug":"skaffold-sync-is-currently-only-available-for-jar","errorCode":null,"errorMessage":"Skaffold sync is currently only available for 'jar' style Jib projects, but the project ${getProject().getName()} is configured to generate a 'war'","messagePattern":"Skaffold sync is currently only available for 'jar' style Jib projects, but the project (.+?) is configured to generate a 'war'","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/skaffold/SyncMapTask.java","lineNumber":64,"sourceCode":"\n  /** Task Action, lists files and container targets. */\n  @TaskAction\n  public void listFilesAndTargets() {\n    Preconditions.checkNotNull(jibExtension);\n\n    try (TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider()) {\n      GradleProjectProperties projectProperties =\n          GradleProjectProperties.getForProject(\n              getProject(),\n              getLogger(),\n              tempDirectoryProvider,\n              jibExtension.getConfigurationName().get());\n\n      GradleRawConfiguration configuration = new GradleRawConfiguration(jibExtension);\n\n      // TODO: move these shared checks with SyncMapMojo into plugins-common\n      if (projectProperties.isWarProject()) {\n        throw new GradleException(\n            \"Skaffold sync is currently only available for 'jar' style Jib projects, but the project \"\n                + getProject().getName()\n                + \" is configured to generate a 'war'\");\n      }\n      try {\n        if (!ContainerizingMode.EXPLODED.equals(\n            ContainerizingMode.from(jibExtension.getContainerizingMode()))) {\n          throw new GradleException(\n              \"Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of \"\n                  + getProject().getName()\n                  + \" is '\"\n                  + jibExtension.getContainerizingMode()\n                  + \"'\");\n        }\n      } catch (InvalidContainerizingModeException ex) {\n        throw new GradleException(\"Invalid containerizing mode\", ex);\n      }\n","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/skaffold/SyncMapTask.java#L46-L82","documentation":"SyncMapTask (jib:skaffoldSyncMap equivalent) refuses to produce a Skaffold sync map for WAR projects. Skaffold file-sync support in Jib is implemented only for jar-style (bootJar/jar) builds; the task checks projectProperties.isWarProject() and fails fast with a GradleException.","triggerScenarios":"Running the Skaffold sync map task on a Gradle project where the war plugin is applied (or the project is otherwise detected as a WAR project), while invoking Skaffold sync.","commonSituations":"A Spring Boot or web project with 'java { withWar...' or the war plugin applied; developers switching a project from jar to war packaging and then running Skaffold dev with Jib containerizing.","solutions":["Remove the war plugin / war packaging and build a jar instead.","If you need both, keep the war configuration out of the project Skaffold syncs against.","Fall back to regular Jib container builds (image rebuild on change) instead of Skaffold sync for WAR projects.","Track the plugins-common TODO: shared war check with SyncMapMojo — Maven WAR projects are equally unsupported."],"exampleFix":"// before\nplugins { id 'war' }\n// after\nplugins { id 'java' } // or bootJar; keep packaging as jar for Skaffold sync","handlingStrategy":"validation","validationCode":"// build.gradle\nif (plugins.hasPlugin('war')) {\n  throw new GradleException('Skaffold sync requires jar packaging; war plugin applied')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep Skaffold-synced modules on jar packaging.","Audit plugin blocks for 'war' before enabling Skaffold sync.","Document that sync only supports jar-style Jib projects."],"tags":["skaffold","gradle","war","unsupported-packaging"],"backgroundTag":"unsupported-operation","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"}