{"record":{"id":"d3f8f4c588b36b3d","repo":"GoogleContainerTools/jib","slug":"container-workingdirectory-is-not-an-absolute-u-d3f8f4","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/BuildImageMojo.java","lineNumber":129,"sourceCode":"              new MavenRawConfiguration(this),\n              new MavenSettingsServerCredentials(\n                  getSession().getSettings(), getSettingsDecrypter()),\n              projectProperties,\n              globalConfig,\n              new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))\n          .runBuild();\n\n    } catch (InvalidAppRootException ex) {\n      throw new MojoExecutionException(\n          \"<container><appRoot> is not an absolute Unix-style path: \" + ex.getInvalidPathValue(),\n          ex);\n\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\\\": \"","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java#L111-L147","documentation":"Jib validates <container><workingDirectory>, which sets the WORKDIR of the built container. If the value is not an absolute Unix-style path (leading '/'), InvalidWorkingDirectoryException is thrown and execute() rethrows it as a MojoExecutionException that includes the offending value.","triggerScenarios":"Setting <workingDirectory> to a relative path like 'workspace' or a Windows path like 'C:\\work' in pom.xml or via -Djib.container.workingDirectory.","commonSituations":"Windows developers specifying host-style paths; omitting the leading slash; empty string when a property interpolates to nothing.","solutions":["Set <workingDirectory> to an absolute Unix path, e.g. /workspace.","Remove <workingDirectory> to let the image use its default WORKDIR.","Verify any property/CLI value (-Djib.container.workingDirectory) also uses the leading slash."],"exampleFix":"// before\n<workingDirectory>workspace</workingDirectory>\n// after\n<workingDirectory>/workspace</workingDirectory>","handlingStrategy":"validation","validationCode":"String wd = System.getProperty(\"jib.container.workingDirectory\", pomWorkingDir);\nif (wd != null && !wd.startsWith(\"/\")) {\n  throw new IllegalArgumentException(\"<workingDirectory> must be absolute Unix path, got: \" + wd);\n}","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) { if (e.getMessage().contains(\"workingDirectory\")) { /* set an absolute '/' path or remove the element */ } }","preventionTips":["Container paths always need a leading '/'","Never reuse host OS paths for container configuration","Omit <workingDirectory> if the base image already defines a suitable WORKDIR"],"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"}