{"record":{"id":"04ff338b7661a6bf","repo":"GoogleContainerTools/jib","slug":"container-volumes-is-not-an-absolute-unix-style-04ff33","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/BuildImageMojo.java","lineNumber":141,"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":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java#L123-L159","documentation":"Jib validates every entry of <container><volumes> (VOLUME mount points in the built image). Each must be an absolute Unix-style path; InvalidContainerVolumeException is thrown for any offender and execute() wraps it in a MojoExecutionException naming the invalid volume.","triggerScenarios":"Adding <volume> entries like 'data' or '/data/logs/:' or Windows paths under <volumes> in pom.xml or via -Djib.container.volumes.","commonSituations":"Specifying relative mount points by mistake; comma-separated property values containing whitespace or malformed entries; converting Dockerfile VOLUME directives incorrectly.","solutions":["Change each <volume> to an absolute Unix path starting with '/', e.g. /data.","Remove invalid/empty entries from the <volumes> list.","If using the CLI property form, check each comma-separated value individually."],"exampleFix":"// before\n<volumes><volume>data</volume></volumes>\n// after\n<volumes><volume>/data</volume></volumes>","handlingStrategy":"validation","validationCode":"for (String v : volumeList) {\n  if (!v.startsWith(\"/\")) {\n    throw new IllegalArgumentException(\"<volumes> entries must be absolute Unix paths, got: \" + v);\n  }\n}","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) { if (e.getMessage().contains(\"volumes\")) { /* correct the named volume to start with '/' */ } }","preventionTips":["Mirror Dockerfile VOLUME syntax: absolute paths only","When using -Djib.container.volumes, check every comma-separated entry","Trim whitespace from property values in CI"],"tags":["maven","jib","configuration","path-validation","volumes"],"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"}