{"record":{"id":"d78f6686b0d02c7a","repo":"GoogleContainerTools/jib","slug":"message-from-buildstepsexecutionexception-d78f66","errorCode":null,"errorMessage":"<message from BuildStepsExecutionException>","messagePattern":"<message from BuildStepsExecutionException>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java","lineNumber":181,"sourceCode":"\n    } catch (IncompatibleBaseImageJavaVersionException ex) {\n      throw new MojoExecutionException(\n          HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(\n              ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),\n          ex);\n\n    } catch (InvalidImageReferenceException ex) {\n      throw new MojoExecutionException(\n          HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);\n\n    } catch (IOException\n        | CacheDirectoryCreationException\n        | MainClassInferenceException\n        | InvalidGlobalConfigException ex) {\n      throw new MojoExecutionException(ex.getMessage(), ex);\n\n    } catch (BuildStepsExecutionException ex) {\n      throw new MojoExecutionException(ex.getMessage(), ex.getCause());\n\n    } catch (ExtraDirectoryNotFoundException ex) {\n      throw new MojoExecutionException(\n          \"<extraDirectories><paths> contain \\\"from\\\" directory that doesn't exist locally: \"\n              + ex.getPath(),\n          ex);\n    } finally {\n      tempDirectoryProvider.close();\n      MojoCommon.finishUpdateChecker(projectProperties, updateCheckFuture);\n      projectProperties.waitForLoggingThread();\n      getLog().info(\"\");\n    }\n  }\n}\n","sourceCodeStart":163,"sourceCodeEnd":196,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java#L163-L196","documentation":"BuildImageMojo.execute catches BuildStepsExecutionException and rethrows its message with the root cause. This wraps any failure that occurred while jib's build steps (containerizing, layer building, registry push) executed, so the real reason is in ex.getCause().","triggerScenarios":"Any failure inside .runBuild() during 'mvn jib:build' that is not caught by the more specific handlers above: registry authentication errors, network failures, blob push failures, etc.","commonSituations":"Docker Hub/GCR auth failure (wrong credentials in ~/.docker/config.json or docker login not run); network/registry outage mid-push; registry quota exceeded.","solutions":["Look at the CAUSE printed below the MojoExecutionException message; fix that underlying problem.","For auth errors run 'docker login <registry>' or configure credentials in settings.xml / credential helpers.","For network errors check connectivity to the registry and retry."],"exampleFix":"// before: failing push due to missing auth\nmvn jib:build\n// after\ndocker login gcr.io\nmvn jib:build","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { ... } catch (BuildStepsExecutionException e) {\n  log.error(\"jib build failed: \" + e.getMessage(), e.getCause());\n  if (e.getCause() instanceof RegistryUnauthorizedException) { /* refresh docker login */ }\n}","preventionTips":["Run 'docker login <registry>' before pushing","Check registry availability and quotas in CI","Always read the CAUSE line; the wrapped message alone is not diagnostic"],"tags":["maven","jib","build-steps","registry"],"backgroundTag":"http-error-response","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}