GoogleContainerTools/jib · error · MojoExecutionException

Could not determine Jib plugin version

Error message

Could not determine Jib plugin version

What it means

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.

Source

Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MojoCommon.java:166

    }
    return permissionsMap;
  }

  /**
   * Check that the actual version satisfies required Jib version range when specified. No check is
   * performed if the provided Jib version is {@code null}, which should only occur during debug.
   *
   * @param descriptor the plugin version
   * @throws MojoExecutionException if the version is not acceptable
   */
  public static void checkJibVersion(PluginDescriptor descriptor) throws MojoExecutionException {
    String acceptableVersionSpec = System.getProperty(MojoCommon.REQUIRED_VERSION_PROPERTY_NAME);
    if (acceptableVersionSpec == null) {
      return;
    }
    String actualVersion = descriptor.getVersion();
    if (actualVersion == null) {
      throw new MojoExecutionException("Could not determine Jib plugin version");
    }
    VersionChecker<DefaultArtifactVersion> checker =
        new VersionChecker<>(DefaultArtifactVersion::new);
    if (!checker.compatibleVersion(acceptableVersionSpec, actualVersion)) {
      String failure =
          String.format(
              "Jib plugin version is %s but is required to be %s",
              actualVersion, acceptableVersionSpec);
      throw new MojoExecutionException(failure);
    }
  }

  /**
   * Determines if Jib goal execution on this project/module should be skipped due to configuration.
   *
   * @param jibPluginConfiguration usually {@code this}, the Mojo this check is applied in.
   * @return {@code true} if Jib should be skipped (should not execute goal), or {@code false} if it
   *     should continue with execution.

View on GitHub (pinned to fb949e2676)

Solutions

  1. Delete the jib-maven-plugin artifacts from ~/.m2/repository and re-resolve a clean release version.
  2. Use an official released version of jib-maven-plugin from Maven Central instead of a locally built one.
  3. If you must use a custom build, build with mvn install so the versioned descriptor is present.
  4. As a workaround remove jib.requiredVersion / skip the _skaffold-fail-if-jib-out-of-date check.

Example fix

// before (custom local build without descriptor)
mvn clean package -DskipTests  # jar has no version metadata
// after
mvn clean install -DskipTests  # or use the released plugin:
<groupId>com.google.cloud.tools</groupId><artifactId>jib-maven-plugin</artifactId><version>3.4.x</version>
Defensive patterns

Strategy: validation

Validate before calling

String v = project.getPlugin("com.google.cloud.tools:jib-maven-plugin").getVersion();
if (v == null) throw new IllegalStateException("jib-maven-plugin has no resolvable version; reinstall the plugin artifact");

Try / catch

try { ... } catch (MojoExecutionException e) { if (e.getMessage().contains("Could not determine Jib plugin version")) { /* reinstall plugin / skip check */ } }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.

Related errors


AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06). Data as JSON: /api/errors/c5d49650e9b4cba2. Report an issue: GitHub.