GoogleContainerTools/jib · error · IllegalArgumentException
extension ${extension.getClass().getSimpleName()} does not e
Error message
extension ${extension.getClass().getSimpleName()} does not expect extension-specific configuration; remove the inapplicable 'pluginExtension.configuration' from Gradle build script What it means
runPluginExtension throws IllegalArgumentException when an extension-specific configuration block ('pluginExtension.configuration') is provided in the Gradle build script but the configured extension declares no extra configuration type (extraConfigType is empty). Extensions that do not accept configuration cannot receive one, so Jib fails fast.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/GradleProjectProperties.java:503
ex);
}
}
// Unchecked casting: "getExtraConfiguration().get()" (Object) to Action<T> and "extension"
// (JibGradlePluginExtension<?>) to JibGradlePluginExtension<T> where T is the extension-defined
// config type (as requested by "JibGradlePluginExtension.getExtraConfigType()").
@SuppressWarnings({"unchecked"})
private <T> ContainerBuildPlan runPluginExtension(
Optional<Class<T>> extraConfigType,
JibGradlePluginExtension<?> extension,
ExtensionConfiguration config,
ContainerBuildPlan buildPlan)
throws JibPluginExtensionException {
T extraConfig = null;
Optional<Object> configs = config.getExtraConfiguration();
if (configs.isPresent()) {
if (!extraConfigType.isPresent()) {
throw new IllegalArgumentException(
"extension "
+ extension.getClass().getSimpleName()
+ " does not expect extension-specific configuration; remove the inapplicable "
+ "'pluginExtension.configuration' from Gradle build script");
} else {
// configs.get() is of type Action, so this cast always succeeds.
// (Note generic <T> is erased at runtime.)
Action<T> action = (Action<T>) configs.get();
extraConfig = project.getObjects().newInstance(extraConfigType.get(), project);
action.execute(extraConfig);
}
}
try {
return ((JibGradlePluginExtension<T>) extension)
.extendContainerBuildPlan(
buildPlan,
config.getProperties(),View on GitHub (pinned to fb949e2676)
Solutions
- Remove the 'configuration { ... }' block from the pluginExtension declaration
- If configuration is needed, verify the extension actually supports extra configuration and you are using its documented configuration type
- Check the extension's class name in 'implementation' matches the one the documentation shows for the configuration example
Example fix
// before
jib { pluginExtensions { pluginExtension {
implementation = 'com.google.cloud.tools.jib.gradle.extension.springboot.JibSpringBootExtension'
configuration { someOption = true } // not supported
} } }
// after: drop the configuration block
jib { pluginExtensions { pluginExtension {
implementation = 'com.google.cloud.tools.jib.gradle.extension.springboot.JibSpringBootExtension'
} } } Defensive patterns
Strategy: validation
Validate before calling
// only add a configuration block if the extension documents one
// quick check in build.gradle:
def ext = project.extensions.getByType(com.google.cloud.tools.jib.gradle.JibExtension)
assert !jib.pluginExtensions.collect { it.configuration }.contains(null) || true // review declarations manually Prevention
- Add pluginExtension.configuration only for extensions that expose an extra-configuration type
- Copy configuration examples from the exact extension's documentation
- Remove leftover configuration blocks when swapping extension implementations
When it happens
Trigger: In build.gradle: jib { pluginExtensions { pluginExtension { implementation = '...'; configuration { ... } } } } where the extension class does not implement JibGradlePluginExtension with an extra configuration type.
Common situations: Copying a configuration block from documentation for a different extension; adding a configuration closure to a built-in extension like jib-spring-boot that takes none; leftover config after switching extension implementations.
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/97e706b6f49afef4.
Report an issue: GitHub.