{"record":{"id":"0a27fb2fc4a22dcc","repo":"GoogleContainerTools/jib","slug":"jib-plugin-version-is-s-but-is-required-to-be-s-0a27fb","errorCode":null,"errorMessage":"Jib plugin version is %s but is required to be %s","messagePattern":"Jib plugin version is (.+?) but is required to be (.+?)","errorType":"validation","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MojoCommon.java","lineNumber":175,"sourceCode":"   * @throws MojoExecutionException if the version is not acceptable\n   */\n  public static void checkJibVersion(PluginDescriptor descriptor) throws MojoExecutionException {\n    String acceptableVersionSpec = System.getProperty(MojoCommon.REQUIRED_VERSION_PROPERTY_NAME);\n    if (acceptableVersionSpec == null) {\n      return;\n    }\n    String actualVersion = descriptor.getVersion();\n    if (actualVersion == null) {\n      throw new MojoExecutionException(\"Could not determine Jib plugin version\");\n    }\n    VersionChecker<DefaultArtifactVersion> checker =\n        new VersionChecker<>(DefaultArtifactVersion::new);\n    if (!checker.compatibleVersion(acceptableVersionSpec, actualVersion)) {\n      String failure =\n          String.format(\n              \"Jib plugin version is %s but is required to be %s\",\n              actualVersion, acceptableVersionSpec);\n      throw new MojoExecutionException(failure);\n    }\n  }\n\n  /**\n   * Determines if Jib goal execution on this project/module should be skipped due to configuration.\n   *\n   * @param jibPluginConfiguration usually {@code this}, the Mojo this check is applied in.\n   * @return {@code true} if Jib should be skipped (should not execute goal), or {@code false} if it\n   *     should continue with execution.\n   */\n  public static boolean shouldSkipJibExecution(JibPluginConfiguration jibPluginConfiguration) {\n    Log log = jibPluginConfiguration.getLog();\n    if (jibPluginConfiguration.isSkipped()) {\n      log.info(\"Skipping containerization because jib-maven-plugin: skip = true\");\n      return true;\n    }\n    if (!jibPluginConfiguration.isContainerizable()) {\n      log.info(","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MojoCommon.java#L157-L193","documentation":"checkJibVersion compares the actual jib-maven-plugin version against the required version spec from the jib.requiredVersion system property using Maven's version range checking. When the actual version does not satisfy the spec, this MojoExecutionException is thrown with both versions in the message. It exists so Skaffold can enforce a minimum compatible Jib plugin version.","triggerScenarios":"jib.requiredVersion is set (by Skaffold or a developer) to a spec/range like '1.7.0' or '[3.0,)' and the installed plugin version fails VersionChecker.compatibleVersion.","commonSituations":"Running with an older Jib plugin than the Skaffold version expects; pinning an outdated jib-maven-plugin version in pom.xml; Skaffold bumped its minimum required Jib version after an upgrade.","solutions":["Upgrade jib-maven-plugin in pom.xml to a version satisfying the required spec (see the version printed in the message).","Update Skaffold so its requiredVersion matches your plugin version.","If the requirement is intentional, install the exact required version, e.g. mvn com.google.cloud.tools:jib-maven-plugin:<required>:build.","Temporarily bypass by removing the jib.requiredVersion property (not recommended)."],"exampleFix":"// before\n<artifactId>jib-maven-plugin</artifactId><version>1.8.0</version>\n// after\n<artifactId>jib-maven-plugin</artifactId><version>3.4.0</version>","handlingStrategy":"validation","validationCode":"String required = System.getProperty(\"jib.requiredVersion\");\nString actual = project.getPlugin(\"com.google.cloud.tools:jib-maven-plugin\").getVersion();\nif (required != null && !new VersionChecker<>(DefaultArtifactVersion::new).compatibleVersion(required, actual)) {\n  throw new IllegalStateException(\"Upgrade jib-maven-plugin to \" + required);\n}","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { if (e.getMessage().startsWith(\"Jib plugin version is\")) { /* upgrade pom plugin version or align Skaffold */ } }","preventionTips":["Keep jib-maven-plugin version in sync with the minimum your Skaffold version requires","Pin plugin versions with a parent BOM or pluginManagement to avoid drift","After Skaffold upgrades, re-check its minimum Jib version notes","Run the version check in CI early rather than during image builds"],"tags":["maven","skaffold","version-check","version-mismatch"],"backgroundTag":"invalid-config-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"}