GoogleContainerTools/jib · error · MojoExecutionException

<container><volumes> is not an absolute Unix-style path: <in

Error message

<container><volumes> is not an absolute Unix-style path: <invalidVolume>

What it means

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.

Source

Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java:141

    } 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(),
          ex);
    } catch (InvalidContainerVolumeException ex) {
      throw new MojoExecutionException(
          "<container><volumes> is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);

    } catch (InvalidFilesModificationTimeException ex) {
      throw new MojoExecutionException(
          "<container><filesModificationTime> should be an ISO 8601 date-time (see "
              + "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": "
              + ex.getInvalidFilesModificationTime(),
          ex);

    } catch (InvalidCreationTimeException ex) {
      throw new MojoExecutionException(
          "<container><creationTime> should be an ISO 8601 date-time (see "
              + "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", "
              + "\"USE_CURRENT_TIMESTAMP\"): "
              + ex.getInvalidCreationTime(),
          ex);

    } catch (JibPluginExtensionException ex) {

View on GitHub (pinned to fb949e2676)

Solutions

  1. Change each <volume> to an absolute Unix path starting with '/', e.g. /data.
  2. Remove invalid/empty entries from the <volumes> list.
  3. If using the CLI property form, check each comma-separated value individually.

Example fix

// before
<volumes><volume>data</volume></volumes>
// after
<volumes><volume>/data</volume></volumes>
Defensive patterns

Strategy: validation

Validate before calling

for (String v : volumeList) {
  if (!v.startsWith("/")) {
    throw new IllegalArgumentException("<volumes> entries must be absolute Unix paths, got: " + v);
  }
}

Try / catch

catch (MojoExecutionException e) { if (e.getMessage().contains("volumes")) { /* correct the named volume to start with '/' */ } }

Prevention

When it happens

Trigger: Adding <volume> entries like 'data' or '/data/logs/:' or Windows paths under <volumes> in pom.xml or via -Djib.container.volumes.

Common situations: Specifying relative mount points by mistake; comma-separated property values containing whitespace or malformed entries; converting Dockerfile VOLUME directives incorrectly.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06). Data as JSON: /api/errors/04ff338b7661a6bf. Report an issue: GitHub.