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
BuildTarMojo.execute throws this when a platform entry under <from><platforms> is missing required fields or has invalid values (InvalidPlatformException). The message includes the exception's detail message and the offending platform configuration. Each platform needs at least architecture and os (e.g. amd64/linux).
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildTarMojo.java:112
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(),
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(View on GitHub (pinned to fb949e2676)
Solutions
- Provide both <architecture> and <os> in every <platform>, e.g. amd64/linux.
- Fix the specific invalid value named in the exception message.
- Remove empty or incomplete <platform> elements.
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
String arch = "arm64", os = null; // values intended for <platform>
if (arch == null || arch.isBlank() || os == null || os.isBlank()) {
throw new IllegalArgumentException("platform requires both <architecture> and <os>");
} Try / catch
try { ... } catch (MojoExecutionException e) { if (e.getMessage().startsWith("<from><platforms>")) { /* add missing architecture/os fields */ } throw e; } Prevention
- Every <platform> must contain both <architecture> and <os>
- Use standard values like amd64/arm64 and linux/windows
- Remove leftover empty <platform> elements from the pom
When it happens
Trigger: Running 'mvn jib:buildTar' with a <platform> element missing <architecture> or <os>, or containing invalid values like an empty element or unsupported os/arch strings.
Common situations: Adding multi-arch (<platforms>) config for the first time and omitting one required field; typo like <archetecture>; empty <platform></platform> element left in the pom.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Platform must be of form os/architecture.
- <image> is a manifest list, but the list does not contain an
- from.platforms contains a platform configuration that is mis
- <container><appRoot> is not an absolute Unix-style path: ${e
- invalid value for <containerizingMode>: ${ex.getInvalidConta
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/82d70fb4ebb28da0.
Report an issue: GitHub.