GoogleContainerTools/jib · error · GradleException
Could not determine Jib plugin version
Error message
Could not determine Jib plugin version
What it means
checkJibVersion enforces the `jib.requiredVersion` system property (used by Skaffold to pin a compatible Jib version). When the property is set but GradleProjectProperties.TOOL_VERSION is null — Jib could not determine its own plugin version — plugin application fails with this GradleException because compatibility cannot be verified.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/JibPlugin.java:78
+ GradleVersion.current()
+ ", but jib requires "
+ GRADLE_MIN_VERSION
+ " or higher. You can upgrade by running 'gradle wrapper --gradle-version="
+ GRADLE_MIN_VERSION.getVersion()
+ "'.");
}
}
/** Check the Jib version matches the required version (if specified). */
private static void checkJibVersion() {
// todo: should retrieve from project properties?
String requiredVersion = System.getProperty(REQUIRED_VERSION_PROPERTY_NAME);
if (requiredVersion == null) {
return;
}
String actualVersion = GradleProjectProperties.TOOL_VERSION;
if (actualVersion == null) {
throw new GradleException("Could not determine Jib plugin version");
}
VersionChecker<GradleVersion> checker = new VersionChecker<>(GradleVersion::version);
if (!checker.compatibleVersion(requiredVersion, actualVersion)) {
String failure =
String.format(
"Jib plugin version is %s but is required to be %s", actualVersion, requiredVersion);
throw new GradleException(failure);
}
}
@Override
public void apply(Project project) {
checkGradleVersion();
checkJibVersion();
JibExtension jibExtension =
project.getExtensions().create(JIB_EXTENSION_NAME, JibExtension.class, project);
View on GitHub (pinned to fb949e2676)
Solutions
- Reinstall/rebuild the Jib plugin so its jar contains version metadata (use the official release from the plugin portal)
- Check the plugin jar's MANIFEST.MF for Implementation-Version and rebuild if missing
- Temporarily unset jib.requiredVersion / the Skaffold check to unblock the build, then fix the plugin install
- Upgrade Skaffold and the Jib plugin together to matching supported versions
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
if (System.getProperty('jib.requiredVersion') != null &&
GradleProjectProperties.TOOL_VERSION == null) {
logger.warn('jib.requiredVersion is set but plugin version metadata is missing; reinstall the Jib plugin')
} Try / catch
try {
jib.build()
} catch (GradleException e) {
if (e.message == 'Could not determine Jib plugin version') {
logger.error('Reinstall the Jib plugin from the official portal; jar is missing version metadata')
} else { throw e }
} Prevention
- Install the Jib plugin only from the Gradle plugin portal / Maven Central
- Avoid shaded or locally repackaged plugin jars in buildscript classpaths
- Verify plugin jar MANIFEST Implementation-Version when using snapshots
- Keep Skaffold and Jib plugin versions paired per Skaffold's compatibility notes
When it happens
Trigger: Running with -Djib.requiredVersion=<x> (e.g. via _skaffoldFailIfJibOutOfDate) while GradleProjectProperties.TOOL_VERSION is null, usually because the plugin jar's version metadata (MANIFEST/implementation-version) is missing — e.g. a locally built, mangled, or shaded plugin jar.
Common situations: Using a locally-installed/published Jib plugin snapshot whose jar lost version metadata; classpath shading stripping the manifest; Skaffold-managed builds with a modified Jib plugin installation.
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
- container.appRoot is not an absolute Unix-style path: ${inva
- invalid value for containerizingMode: ${invalidContainerizin
- container.workingDirectory is not an absolute Unix-style pat
- from.platforms contains a platform configuration that is mis
- container.volumes is not an absolute Unix-style path: ${inva
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/26550c3d36f5a813.
Report an issue: GitHub.