GoogleContainerTools/jib · error · MojoExecutionException
<from><platforms> contains a platform configuration that is
Error message
<from><platforms> contains a platform configuration that is missing required values or has invalid values: <message>: <invalidPlatform>
What it means
Each entry under <from><platforms> must specify the required fields (architecture and os) with valid values. When a platform configuration is missing required values or has invalid ones, InvalidPlatformException is thrown and rethrown by BuildDockerMojo.execute() as a MojoExecutionException containing the underlying message plus the offending platform record.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java:131
} 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) {
String extensionName = ex.getExtensionClass().getName();
throw new MojoExecutionException(
"error running extension '" + extensionName + "': " + ex.getMessage(), ex);
View on GitHub (pinned to fb949e2676)
Solutions
- Ensure every <platform> element declares both <architecture> and <os>, e.g. <architecture>amd64</architecture><os>linux</os>.
- Verify no Maven property used inside the platform block resolves to empty or blank.
- Use well-known platform values (architecture: amd64/arm64/386, os: linux) and check the message for which value was rejected.
- Remove the <platforms> block entirely if default single-platform behavior (host platform) is what you want.
Example fix
<!-- before --> <from><platforms><platform><architecture>arm64</architecture></platform></platforms></from> <!-- after --> <from><platforms><platform><architecture>arm64</architecture><os>linux</os></platform></platforms></from>
Defensive patterns
Strategy: validation
Validate before calling
for (Platform p : pomPlatforms) {
if (p.architecture == null || p.architecture.isBlank() || p.os == null || p.os.isBlank()) {
throw new IllegalArgumentException("Each <platform> needs non-empty <architecture> and <os>: " + p);
}
} Type guard
boolean isValidPlatform(Platform p) { return p != null && notBlank(p.getArchitecture()) && notBlank(p.getOs()); } Prevention
- Always specify both <architecture> and <os> in every <platform> element.
- Beware Maven properties that resolve to empty strings in CI.
- Use standard values (amd64/arm64, linux) and validate the pom in CI before image builds.
When it happens
Trigger: Running a jib goal with <from><platforms><platform> missing <architecture> or <os>, or with empty/blank values, or with values that fail validation during PluginConfigurationProcessor setup.
Common situations: Hand-editing multi-platform (multi-arch) XML and dropping a tag; leaving <platform></platform> empty as a template; using a property substitution that resolves to an empty string in CI; copying a 32-bit/ARM example with misspelled os/arch names.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- <container><appRoot> is not an absolute Unix-style path: ${e
- invalid value for <containerizingMode>: ${ex.getInvalidConta
- <container><appRoot> is not an absolute Unix-style path: <in
- invalid value for <containerizingMode>: <invalidContainerizi
- <container><workingDirectory> is not an absolute Unix-style
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/d9d1fa6508673c87.
Report an issue: GitHub.