{"record":{"id":"7b90a797192737cd","repo":"GoogleContainerTools/jib","slug":"extradirectories-paths-contain-from-directory-7b90a7","errorCode":null,"errorMessage":"<extraDirectories><paths> contain \"from\" directory that doesn't exist locally: <path>","messagePattern":"<extraDirectories><paths> contain \"from\" directory that doesn't exist locally: <path>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java","lineNumber":184,"sourceCode":"          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":166,"sourceCodeEnd":196,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java#L166-L196","documentation":"jib-maven-plugin throws this when an extra directories 'from' path configured via <extraDirectories><paths> does not exist on the local filesystem. ExtraDirectoryNotFoundException carries the missing path, which is appended to the message in BuildImageMojo.execute.","triggerScenarios":"Running 'mvn jib:build' with <extraDirectories><paths><path><from>src/main/jib-custom</from>...</path></paths></extraDirectories> where that directory is absent in the project.","commonSituations":"Renaming or deleting the src/main/jib directory while keeping the pom config; path typo; CI checkout that excludes the directory (sparse checkout, wrong working directory).","solutions":["Create the missing directory (e.g. mkdir -p src/main/jib).","Fix the <from> path in the jib configuration to point at an existing directory.","Remove the <extraDirectories> block if extra files are not needed."],"exampleFix":"<!-- before -->\n<extraDirectories><paths><path><from>src/main/jbi</from></path></paths></extraDirectories>\n<!-- after -->\n<extraDirectories><paths><path><from>src/main/jib</from></path></paths></extraDirectories>","handlingStrategy":"validation","validationCode":"String extraDir = \"src/main/jib\";\nif (!new java.io.File(extraDir).isDirectory()) {\n  throw new IllegalStateException(\"extra directories 'from' path missing: \" + extraDir);\n}","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { if (e.getMessage().contains(\"from\\\" directory that doesn't exist\")) { /* create dir or fix path */ } throw e; }","preventionTips":["Keep the configured extra directories path present in version control","Verify CI checkouts include the directory (no sparse checkout exclusions)","Cross-check the <from> path against the actual project layout after refactors"],"tags":["maven","jib","extra-directories","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}