{"record":{"id":"30ab275e4c4ac3ae","repo":"GoogleContainerTools/jib","slug":"container-approot-is-not-an-absolute-unix-style-30ab27","errorCode":null,"errorMessage":"<container><appRoot> is not an absolute Unix-style path: <invalidPathValue>","messagePattern":"<container><appRoot> 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":120,"sourceCode":"            tempDirectoryProvider,\n            getInjectedPluginExtensions());\n\n    Future<Optional<String>> updateCheckFuture = Futures.immediateFuture(Optional.empty());\n    try {\n      GlobalConfig globalConfig = GlobalConfig.readConfig();\n      updateCheckFuture = MojoCommon.newUpdateChecker(projectProperties, globalConfig, getLog());\n\n      PluginConfigurationProcessor.createJibBuildRunnerForRegistryImage(\n              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(),","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java#L102-L138","documentation":"During the build, Jib validates the <container><appRoot> parameter, which sets the directory in the container where the application files are placed. If the configured value is not an absolute Unix-style path (must start with '/'), the build surfaces InvalidAppRootException, which execute() wraps in a MojoExecutionException including the invalid value.","triggerScenarios":"Setting <appRoot> to a relative path like 'app' or 'myapp/root' instead of '/app'; using a Windows-style path like 'C:\\app'; setting it to empty/invalid text in pom.xml or via -Djib.container.appRoot.","commonSituations":"Porting configs from Windows dev machines; forgetting the leading slash when customizing the app directory; copying Spring Boot layered-jar configs with wrong paths.","solutions":["Change <appRoot> to an absolute Unix path starting with '/', e.g. /app.","Remove <appRoot> to use the default (/app for non-exploded, standard layouts).","If running on Windows, still use a forward-slash absolute path — it is a container path, not a host path."],"exampleFix":"<!-- before -->\n<container><appRoot>myapp/root</appRoot></container>\n<!-- after -->\n<container><appRoot>/myapp/root</appRoot></container>","handlingStrategy":"validation","validationCode":"String appRoot = System.getProperty(\"jib.container.appRoot\", pomAppRoot);\nif (appRoot != null && !appRoot.startsWith(\"/\")) {\n  throw new IllegalArgumentException(\"<appRoot> must be an absolute Unix path, got: \" + appRoot);\n}","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) { if (e.getMessage().contains(\"appRoot\")) { /* correct <appRoot> to start with '/' and rerun */ } }","preventionTips":["Always start container paths with '/' — they are Linux paths even on Windows hosts","Use forward slashes, never backslashes","Omit <appRoot> unless you specifically need a custom layout"],"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"}