GoogleContainerTools/jib · error · MojoExecutionException
error running extension '<extensionClassName>': <message>
Error message
error running extension '<extensionClassName>': <message>
What it means
A Jib plugin extension (configured via <pluginExtensions> or injected extension artifacts) threw an exception while running. BuildDockerMojo.execute() catches JibPluginExtensionException and rewraps it as a MojoExecutionException naming the extension class and its message, so the build fails during the extension phase of the dockerBuild goal.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java:157
"<container><creationTime> should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", "
+ "\"USE_CURRENT_TIMESTAMP\"): "
+ ex.getInvalidCreationTime(),
ex);
} catch (JibPluginExtensionException ex) {
String extensionName = ex.getExtensionClass().getName();
throw new MojoExecutionException(
"error running extension '" + extensionName + "': " + ex.getMessage(), ex);
} catch (IncompatibleBaseImageJavaVersionException ex) {
throw new MojoExecutionException(
HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(
ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),
ex);
} catch (InvalidImageReferenceException ex) {
throw new MojoExecutionException(
HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);
} catch (IOException
| CacheDirectoryCreationException
| MainClassInferenceException
| InvalidGlobalConfigException ex) {
throw new MojoExecutionException(ex.getMessage(), ex);
} catch (BuildStepsExecutionException ex) {
throw new MojoExecutionException(ex.getMessage(), ex.getCause());
} catch (ExtraDirectoryNotFoundException ex) {
throw new MojoExecutionException(
"<extraDirectories><paths> contain \"from\" directory that doesn't exist locally: "
+ ex.getPath(),
ex);
} finally {
tempDirectoryProvider.close();View on GitHub (pinned to fb949e2676)
Solutions
- Read the extension name and message in the error to identify which extension failed, then fix that extension's configuration or code.
- Update the extension to a version compatible with your jib-maven-plugin version.
- Temporarily remove the <pluginExtensions> or extension dependency to confirm the core build works without it.
- Debug the extension's entry point (the class named in the error) and ensure it handles your project type.
Example fix
// before (pom.xml) <pluginExtensions> <pluginExtension implementation="com.example.BrokenJibExtension"/> </pluginExtensions> // after: fix or remove the failing extension <pluginExtensions> <pluginExtension implementation="com.example.FixedJibExtension"/> </pluginExtensions>
Defensive patterns
Strategy: try-catch
Validate before calling
// Verify extension compatibility before the build: // mvn dependency:tree -Dincludes=com.google.cloud.tools:jib-maven-plugin-extension-*
Try / catch
try {
mvn jib:dockerBuild
} catch (MojoExecutionException e) {
if (e.getMessage().startsWith("error running extension '")) {
// log extension class name from message, fall back to a build without the extension
}
} Prevention
- Keep extensions on versions matching your jib-maven-plugin version.
- Test extensions in a separate profile so the core build can run without them.
- Wrap risky logic in custom extensions with clear error messages.
When it happens
Trigger: Running 'mvn jib:dockerBuild' with a Jib extension (e.g. jib-spring-boot or a custom JibPluginExtension) whose extensionClass threw during extendBuildContext/run, including exceptions raised inside user extension code.
Common situations: Custom extension code throwing due to bad extension configuration; extension version incompatible with the Jib core version; extension assuming a project layout that doesn't exist (e.g. non-Spring project with jib-spring-boot); network or file access failures inside the extension.
Related errors
- error running extension '<extensionClassName>': <message>
- extension ${extension.getClass().getSimpleName()} does not e
- extension-specific <configuration> for ${extension.getClass(
- extension configured but not discovered on Jib runtime class
- Failed to generate a Jib file map for sync with Skaffold
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/55ea3cee835d07ab.
Report an issue: GitHub.