{"record":{"id":"c50653d202dbfb16","repo":"GoogleContainerTools/jib","slug":"container-approot-is-not-an-absolute-unix-style-c50653","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/BuildTarMojo.java","lineNumber":98,"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.createJibBuildRunnerForTarImage(\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":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildTarMojo.java#L80-L116","documentation":"jib-maven-plugin (BuildTarMojo) throws this when the <container><appRoot> value is not an absolute Unix-style path (must start with '/' and be a valid Unix path). InvalidAppRootException provides the offending value, which is embedded in the message.","triggerScenarios":"Running 'mvn jib:buildTar' with <container><appRoot> set to a relative path like 'app/libs' or a Windows-style path like 'C:\\app'.","commonSituations":"Setting appRoot to a relative directory out of habit; migrating configs from Windows machines with backslash paths; missing leading slash after hand-editing the pom.","solutions":["Prefix the value with '/' e.g. <appRoot>/app</appRoot>.","Use forward slashes only; remove any drive letter or backslashes.","If using the default, remove the <appRoot> element entirely (default is /app)."],"exampleFix":"<!-- before -->\n<container><appRoot>app/libs</appRoot></container>\n<!-- after -->\n<container><appRoot>/app/libs</appRoot></container>","handlingStrategy":"validation","validationCode":"String appRoot = \"app/libs\";\nif (!appRoot.startsWith(\"/\") || appRoot.contains(\"\\\\\")) {\n  throw new IllegalArgumentException(\"<appRoot> must be an absolute Unix path: \" + appRoot);\n}","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { if (e.getMessage().startsWith(\"<container><appRoot>\")) { /* make path absolute */ } throw e; }","preventionTips":["Always start appRoot with '/'","Use forward slashes only, never Windows backslash paths","Omit <appRoot> to accept the /app default"],"tags":["maven","jib","approot","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"}