GoogleContainerTools/jib · error · MojoExecutionException
Jib plugin version is %s but is required to be %s
Error message
Jib plugin version is %s but is required to be %s
What it means
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.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MojoCommon.java:175
* @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.
*/
public static boolean shouldSkipJibExecution(JibPluginConfiguration jibPluginConfiguration) {
Log log = jibPluginConfiguration.getLog();
if (jibPluginConfiguration.isSkipped()) {
log.info("Skipping containerization because jib-maven-plugin: skip = true");
return true;
}
if (!jibPluginConfiguration.isContainerizable()) {
log.info(View on GitHub (pinned to fb949e2676)
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).
Example fix
// before <artifactId>jib-maven-plugin</artifactId><version>1.8.0</version> // after <artifactId>jib-maven-plugin</artifactId><version>3.4.0</version>
Defensive patterns
Strategy: validation
Validate before calling
String required = System.getProperty("jib.requiredVersion");
String actual = project.getPlugin("com.google.cloud.tools:jib-maven-plugin").getVersion();
if (required != null && !new VersionChecker<>(DefaultArtifactVersion::new).compatibleVersion(required, actual)) {
throw new IllegalStateException("Upgrade jib-maven-plugin to " + required);
} Try / catch
try { ... } catch (MojoExecutionException e) { if (e.getMessage().startsWith("Jib plugin version is")) { /* upgrade pom plugin version or align Skaffold */ } } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Could not determine Jib plugin version
- Jib plugin version is %s but is required to be %s
- _skaffold-fail-if-jib-out-of-date requires jib.requiredVersi
- Failed to resolve dependencies
- ${ex.getMessage()}
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/0a27fb2fc4a22dcc.
Report an issue: GitHub.