{"record":{"id":"318b42ad403747b3","repo":"GoogleContainerTools/jib","slug":"container-workingdirectory-is-not-an-absolute-u","errorCode":null,"errorMessage":"<container><workingDirectory> is not an absolute Unix-style path: <invalidPathValue>","messagePattern":"<container><workingDirectory> is not an absolute Unix-style path: <invalidPathValue>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java","lineNumber":127,"sourceCode":"\n    } catch (InvalidContainerizingModeException ex) {\n      throw new MojoExecutionException(\n          \"invalid value for <containerizingMode>: \" + ex.getInvalidContainerizingMode(), ex);\n\n    } catch (InvalidWorkingDirectoryException ex) {\n      throw new MojoExecutionException(\n          \"<container><workingDirectory> is not an absolute Unix-style path: \"\n              + ex.getInvalidPathValue(),\n          ex);\n    } catch (InvalidPlatformException ex) {\n      throw new MojoExecutionException(\n          \"<from><platforms> contains a platform configuration that is missing required values or has invalid values: \"\n              + ex.getMessage()\n              + \": \"\n              + ex.getInvalidPlatform(),\n          ex);\n    } catch (InvalidContainerVolumeException ex) {\n      throw new MojoExecutionException(\n          \"<container><volumes> is not an absolute Unix-style path: \" + ex.getInvalidVolume(), ex);\n\n    } catch (InvalidFilesModificationTimeException ex) {\n      throw new MojoExecutionException(\n          \"<container><filesModificationTime> should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or special keyword \\\"EPOCH_PLUS_SECOND\\\": \"\n              + ex.getInvalidFilesModificationTime(),\n          ex);\n\n    } catch (InvalidCreationTimeException ex) {\n      throw new MojoExecutionException(\n          \"<container><creationTime> should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\\\"EPOCH\\\", \"\n              + \"\\\"USE_CURRENT_TIMESTAMP\\\"): \"\n              + ex.getInvalidCreationTime(),\n          ex);\n\n    } catch (JibPluginExtensionException ex) {","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java#L109-L145","documentation":"Jib validates that <container><workingDirectory> is an absolute Unix-style path (must start with '/'). If the configured path is relative or otherwise non-absolute, InvalidWorkingDirectoryException is thrown while processing configuration and BuildDockerMojo.execute() converts it into a MojoExecutionException echoing the invalid value.","triggerScenarios":"Building with 'mvn jib:dockerBuild' when the pom contains <workingDirectory>app/bin</workingDirectory> (no leading slash) or a Windows-style path like 'C:\\app' inside <container><workingDirectory>.","commonSituations":"Copying Docker WORKDIR conventions that allow relative paths; setting the directory on Windows and using a drive letter; typo omitting the leading slash; generating the value from a Maven property that resolves relative.","solutions":["Change <workingDirectory> to an absolute Unix path starting with '/', e.g. /app or /workspace.","Replace any Windows-style path (drive letter, backslashes) with a forward-slash absolute path.","If the intent was a relative offset, compute the absolute path in the pom (e.g. via properties) before passing it to Jib."],"exampleFix":"// before (pom.xml)\n<container><workingDirectory>app/bin</workingDirectory></container>\n// after\n<container><workingDirectory>/app/bin</workingDirectory></container>","handlingStrategy":"validation","validationCode":"String wd = pomWorkingDirectory;\nif (wd != null && !wd.startsWith(\"/\")) {\n  throw new IllegalArgumentException(\"<workingDirectory> must be an absolute Unix path: \" + wd);\n}","typeGuard":"boolean isAbsoluteUnixPath(String p) { return p != null && p.startsWith(\"/\"); }","tryCatchPattern":null,"preventionTips":["Always prefix container paths with a forward slash.","Never use Windows drive-letter paths in container configuration.","Review container config after copying examples from Dockerfiles."],"tags":["maven","jib","configuration","path-validation"],"backgroundTag":"invalid-config-value","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"}