GoogleContainerTools/jib · error · MojoExecutionException
<container><appRoot> is not an absolute Unix-style path: ${e
Error message
<container><appRoot> is not an absolute Unix-style path: ${ex.getInvalidPathValue()} What it means
During the Docker build, Jib validates <container><appRoot>: it must be an absolute Unix-style path (e.g. /app). InvalidAppRootException carries the offending value, which BuildDockerMojo rethrows as MojoExecutionException with this message and the cause attached.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java:106
tempDirectoryProvider,
getInjectedPluginExtensions());
Future<Optional<String>> updateCheckFuture = Futures.immediateFuture(Optional.empty());
try {
GlobalConfig globalConfig = GlobalConfig.readConfig();
updateCheckFuture = MojoCommon.newUpdateChecker(projectProperties, globalConfig, getLog());
PluginConfigurationProcessor.createJibBuildRunnerForDockerDaemonImage(
new MavenRawConfiguration(this),
new MavenSettingsServerCredentials(
getSession().getSettings(), getSettingsDecrypter()),
projectProperties,
globalConfig,
new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))
.runBuild();
} catch (InvalidAppRootException ex) {
throw new MojoExecutionException(
"<container><appRoot> is not an absolute Unix-style path: " + ex.getInvalidPathValue(),
ex);
} catch (InvalidContainerizingModeException ex) {
throw new MojoExecutionException(
"invalid value for <containerizingMode>: " + ex.getInvalidContainerizingMode(), ex);
} catch (InvalidWorkingDirectoryException ex) {
throw new MojoExecutionException(
"<container><workingDirectory> is not an absolute Unix-style path: "
+ ex.getInvalidPathValue(),
ex);
} catch (InvalidPlatformException ex) {
throw new MojoExecutionException(
"<from><platforms> contains a platform configuration that is missing required values or has invalid values: "
+ ex.getMessage()
+ ": "
+ ex.getInvalidPlatform(),View on GitHub (pinned to fb949e2676)
Solutions
- Change <appRoot> to an absolute Unix-style path starting with '/', e.g. /app.
- Remove <appRoot> entirely to use the default for your packaging type.
- Ensure property expansion like ${app.root} is not resolving to an empty string.
- On Windows builds, still use forward slashes and a leading slash for appRoot.
Example fix
<!-- before --> <container><appRoot>myapp</appRoot></container> <!-- after --> <container><appRoot>/myapp</appRoot></container>
Defensive patterns
Strategy: validation
Validate before calling
<appRoot>${jib.appRoot}</appRoot>
<!-- pre-check in CI -->
<!-- appRoot must match ^/.+ --> Prevention
- Always start appRoot with a forward slash.
- Never use Windows drive-letter or backslash paths.
- Guard templated properties against empty expansion.
- Omit appRoot to accept the Jib default.
When it happens
Trigger: Setting <appRoot> in the jib-maven-plugin <container> configuration to a relative path (e.g. 'app'), a Windows-style path ('C:\app'), or an empty/invalid value, then running jib:dockerBuild.
Common situations: Developers on Windows writing backslash or drive-letter paths; typos omitting the leading slash; values templated from empty properties.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- <container><appRoot> is not an absolute Unix-style path: <in
- <container><workingDirectory> is not an absolute Unix-style
- <container><volumes> is not an absolute Unix-style path: <in
- <container><appRoot> is not an absolute Unix-style path: <in
- <container><workingDirectory> is not an absolute Unix-style
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/edf70a0959ad7e3c.
Report an issue: GitHub.