{"record":{"id":"638359d5b20eec65","repo":"GoogleContainerTools/jib","slug":"container-volumes-is-not-an-absolute-unix-style","errorCode":null,"errorMessage":"<container><volumes> is not an absolute Unix-style path: <invalidVolume>","messagePattern":"<container><volumes> is not an absolute Unix-style path: <invalidVolume>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java","lineNumber":138,"sourceCode":"      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) {\n      String extensionName = ex.getExtensionClass().getName();\n      throw new MojoExecutionException(\n          \"error running extension '\" + extensionName + \"': \" + ex.getMessage(), ex);\n\n    } catch (IncompatibleBaseImageJavaVersionException ex) {\n      throw new MojoExecutionException(\n          HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(\n              ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),\n          ex);\n\n    } catch (InvalidImageReferenceException ex) {","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java#L120-L156","documentation":"Every path listed in <container><volumes> must be an absolute Unix-style path starting with '/'. Jib throws InvalidContainerVolumeException for a non-absolute volume path during configuration processing, and BuildDockerMojo.execute() surfaces it as a MojoExecutionException including the invalid volume value.","triggerScenarios":"Building with a <volumes><volume>data/logs</volume></volumes> entry (no leading slash) or Windows-style paths under <container><volumes> in the pom or via -Djib.container.volumes overrides.","commonSituations":"Mirroring Dockerfile VOLUME directives that used relative or Windows paths; generating the volume list from properties that lost the leading slash; hand-editing the XML in an editor that stripped the slash or used backslashes.","solutions":["Change each <volume> value to an absolute Unix path starting with '/', e.g. /data/logs.","Convert backslash Windows paths to forward-slash absolute paths.","Remove invalid volume entries if they were placeholders."],"exampleFix":"<!-- before -->\n<container><volumes><volume>data/logs</volume></volumes></container>\n<!-- after -->\n<container><volumes><volume>/data/logs</volume></volumes></container>","handlingStrategy":"validation","validationCode":"for (String v : pomVolumes) {\n  if (!v.startsWith(\"/\")) {\n    throw new IllegalArgumentException(\"<volumes> entries must be absolute Unix paths: \" + v);\n  }\n}","typeGuard":"boolean isAbsoluteUnixPath(String p) { return p != null && p.startsWith(\"/\"); }","tryCatchPattern":null,"preventionTips":["Write volume paths exactly as they should appear in the container (leading slash).","Convert any Dockerfile VOLUME conventions before porting them to Jib config.","Keep volume lists short and reviewed, since a bad entry fails the whole build."],"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-14T00:17:10.932Z"}