GoogleContainerTools/jib · error · MojoExecutionException
<message from BuildStepsExecutionException>
Error message
<message from BuildStepsExecutionException>
What it means
The core Jib build steps (building and exporting the image to the Docker daemon) failed. BuildDockerMojo.execute() catches BuildStepsExecutionException and rethrows its message as a MojoExecutionException, using ex.getCause() as the root cause — so the interesting underlying error is in the 'Caused by' chain, not the top-line message.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java:167
} 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();
MojoCommon.finishUpdateChecker(projectProperties, updateCheckFuture);
projectProperties.waitForLoggingThread();
getLog().info("");
}
}
}
View on GitHub (pinned to fb949e2676)
Solutions
- Inspect the 'Caused by' exception in the Maven output to find the real root cause and address it specifically.
- If the cause is daemon-related, verify Docker is installed and running (docker info) — jib:dockerBuild requires a reachable daemon.
- Re-run after fixing credentials/network issues; for cache corruption delete the Jib cache directory (default ~/.cache/google-cloud-tools-java/jib or target/jib-cache).
- Run with -X (mvn -X jib:dockerBuild) for full stack traces when the cause chain is unclear.
Defensive patterns
Strategy: retry
Validate before calling
// Pre-flight: docker info || echo 'Docker daemon not reachable' // and: mvn -q jib:dockerBuild -Djib.skip=false --dry-run scenarios in CI
Try / catch
try {
mvn jib:dockerBuild
} catch (MojoExecutionException e) {
Throwable root = e; while (root.getCause() != null) root = root.getCause();
// inspect root (e.g. registry auth, network) and retry transient failures
} Prevention
- Ensure the Docker daemon is running before jib:dockerBuild in local and CI environments.
- Always read the 'Caused by' chain — the top message is only the wrapper.
- Configure registry credentials in settings.xml ahead of the build.
- Retry transient network/registry failures rather than assuming a config bug.
When it happens
Trigger: Any failure during the dockerBuild runBuild() pipeline: registry authentication failures pulling the base image, network errors, layer cache problems, or export errors writing to the Docker daemon — anything that makes BuildStepsRunner throw BuildStepsExecutionException.
Common situations: Docker daemon stopped or unreachable while jib:dockerBuild runs; wrong registry credentials in settings.xml; transient network failure pulling the base image; corrupted local Jib cache.
Related errors
- <message from BuildStepsExecutionException>
- the configured platform (%s/%s) doesn't match the platform (
- Detected ${GradleVersion.current()}, but jib requires ${GRAD
- HelpfulSuggestions.forDockerNotInstalled(HELPFUL_SUGGESTIONS
- <container><appRoot> is not an absolute Unix-style path: ${e
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/ba82ed4c8a80c1f1.
Report an issue: GitHub.