{"record":{"id":"c5d49650e9b4cba2","repo":"GoogleContainerTools/jib","slug":"could-not-determine-jib-plugin-version-c5d496","errorCode":null,"errorMessage":"Could not determine Jib plugin version","messagePattern":"Could not determine Jib plugin version","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MojoCommon.java","lineNumber":166,"sourceCode":"    }\n    return permissionsMap;\n  }\n\n  /**\n   * Check that the actual version satisfies required Jib version range when specified. No check is\n   * performed if the provided Jib version is {@code null}, which should only occur during debug.\n   *\n   * @param descriptor the plugin version\n   * @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.","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MojoCommon.java#L148-L184","documentation":"Jib's Maven plugin can verify its own version against a required version spec (given via the jib.requiredVersion system property), used by Skaffold to fail fast when the plugin is outdated. checkJibVersion throws this MojoExecutionException when the property is set but the plugin's build descriptor returns no version, so compatibility cannot be checked. It indicates the plugin jar was built without embeddable version metadata.","triggerScenarios":"System property 'jib.requiredVersion' (MojoCommon.REQUIRED_VERSION_PROPERTY_NAME) is set AND descriptor.getVersion() returns null, e.g. the jib-maven-plugin artifact was installed/built in a way that stripped the Maven descriptor version.","commonSituations":"Locally-built or relocated/shaded jib-maven-plugin jars, snapshots resolved from a nonstandard repo, or a corrupted ~/.m2 entry lacking version metadata while Skaffold sets jib.requiredVersion.","solutions":["Delete the jib-maven-plugin artifacts from ~/.m2/repository and re-resolve a clean release version.","Use an official released version of jib-maven-plugin from Maven Central instead of a locally built one.","If you must use a custom build, build with mvn install so the versioned descriptor is present.","As a workaround remove jib.requiredVersion / skip the _skaffold-fail-if-jib-out-of-date check."],"exampleFix":"// before (custom local build without descriptor)\nmvn clean package -DskipTests  # jar has no version metadata\n// after\nmvn clean install -DskipTests  # or use the released plugin:\n<groupId>com.google.cloud.tools</groupId><artifactId>jib-maven-plugin</artifactId><version>3.4.x</version>","handlingStrategy":"validation","validationCode":"String v = project.getPlugin(\"com.google.cloud.tools:jib-maven-plugin\").getVersion();\nif (v == null) throw new IllegalStateException(\"jib-maven-plugin has no resolvable version; reinstall the plugin artifact\");","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { if (e.getMessage().contains(\"Could not determine Jib plugin version\")) { /* reinstall plugin / skip check */ } }","preventionTips":["Use official jib-maven-plugin releases from Maven Central","Build custom plugin versions with mvn install so version metadata is embedded","Verify ~/.m2 plugin artifacts are not corrupted after failed builds","Only set jib.requiredVersion when using a properly published plugin"],"tags":["maven","skaffold","version-check","build-metadata"],"backgroundTag":"missing-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"}