{"record":{"id":"6256942945b04f1d","repo":"GoogleContainerTools/jib","slug":"container-volumes-is-not-an-absolute-unix-style-625694","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/BuildTarMojo.java","lineNumber":119,"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":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildTarMojo.java#L101-L137","documentation":"BuildTarMojo.execute throws this when an entry in <container><volumes> is not an absolute Unix-style path. InvalidContainerVolumeException provides the invalid volume string embedded in the message. Each volume must be an absolute path like /var/log.","triggerScenarios":"Running 'mvn jib:buildTar' with <container><volumes><volume>var/log</volume></volumes></container> (missing leading slash) or a Windows-style path.","commonSituations":"Listing volumes relative by mistake; copy-pasting bind-mount host paths (C:\\data) instead of in-container mount points; whitespace typos.","solutions":["Prefix each volume with '/', e.g. /var/log.","Use only forward slashes and remove drive letters.","Remove invalid <volume> entries if they are not needed."],"exampleFix":"<!-- before -->\n<container><volumes><volume>var/log</volume></volumes></container>\n<!-- after -->\n<container><volumes><volume>/var/log</volume></volumes></container>","handlingStrategy":"validation","validationCode":"String volume = \"var/log\";\nif (!volume.startsWith(\"/\") || volume.contains(\"\\\\\")) {\n  throw new IllegalArgumentException(\"<volumes> entries must be absolute Unix paths: \" + volume);\n}","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { if (e.getMessage().startsWith(\"<container><volumes>\")) { /* make volume path absolute */ } throw e; }","preventionTips":["List in-container mount points only, always absolute paths","Do not copy host bind-mount paths (C:\\data) into <volumes>","Trim whitespace from volume entries in the pom"],"tags":["maven","jib","volumes","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"}