{"record":{"id":"8448f73eeeabef70","repo":"GoogleContainerTools/jib","slug":"extradirectories-paths-contain-from-directory-8448f7","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/BuildTarMojo.java","lineNumber":162,"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":144,"sourceCodeEnd":174,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildTarMojo.java#L144-L174","documentation":"Thrown as a MojoExecutionException from BuildTarMojo.execute when a directory configured under <extraDirectories><paths> with a 'from' attribute does not exist on the local filesystem (ExtraDirectoryNotFoundException). Jib includes the missing path in the message.","triggerScenarios":"Configuring <extraDirectories><paths><path><from>src/main/jib-extra</from></path></paths> where that directory is absent at build time; also when the path is generated by another Maven phase that didn't run, or when a relative path resolves against an unexpected working directory.","commonSituations":"Renaming or deleting an extras directory without updating the POM; CI checkouts that exclude the directory; build-order issues where a resource-generation step hasn't produced the directory yet.","solutions":["Create the directory referenced by the 'from' value, or fix the path in <extraDirectories><paths> to point at the existing directory.","If the directory is generated, ensure the generating Maven execution (e.g. a plugin's generate-resources phase) runs before jib.","Check for typos and correct relative-vs-absolute path resolution (relative paths resolve against the module directory).","If no extra directories are needed, remove the <extraDirectories> configuration entirely."],"exampleFix":"// before\n<extraDirectories><paths><path><from>src/main/jibx</from></path></paths></extraDirectories>\n// after\n<extraDirectories><paths><path><from>src/main/jib</from></path></paths></extraDirectories>","handlingStrategy":"validation","validationCode":"// In a Maven Enforcer/rule or script, before the jib goal:\nString from = \"src/main/jib\"; // value configured under <extraDirectories><paths>\njava.io.File dir = new java.io.File(project.getBasedir(), from);\nif (!dir.isDirectory()) throw new IllegalStateException(\"extra directory missing: \" + dir);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Bind the jib goal to a phase after any step that generates the extra directories.","Keep extras directories inside the module and referenced with correct relative paths.","Remove <extraDirectories> config entirely if unused.","Add the extras directory to version control or ensure CI checkout includes it."],"tags":["maven","jib","file-not-found","configuration"],"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"}