{"record":{"id":"d9d1fa6508673c87","repo":"GoogleContainerTools/jib","slug":"from-platforms-contains-a-platform-configuratio","errorCode":null,"errorMessage":"<from><platforms> contains a platform configuration that is missing required values or has invalid values: <message>: <invalidPlatform>","messagePattern":"<from><platforms> contains a platform configuration that is missing required values or has invalid values: <message>: <invalidPlatform>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java","lineNumber":131,"sourceCode":"\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(),\n          ex);\n    } catch (InvalidContainerVolumeException ex) {\n      throw new MojoExecutionException(\n          \"<container><volumes> is not an absolute Unix-style path: \" + ex.getInvalidVolume(), ex);\n\n    } catch (InvalidFilesModificationTimeException ex) {\n      throw new MojoExecutionException(\n          \"<container><filesModificationTime> should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or special keyword \\\"EPOCH_PLUS_SECOND\\\": \"\n              + ex.getInvalidFilesModificationTime(),\n          ex);\n\n    } catch (InvalidCreationTimeException ex) {\n      throw new MojoExecutionException(\n          \"<container><creationTime> should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\\\"EPOCH\\\", \"\n              + \"\\\"USE_CURRENT_TIMESTAMP\\\"): \"\n              + ex.getInvalidCreationTime(),\n          ex);\n\n    } catch (JibPluginExtensionException ex) {\n      String extensionName = ex.getExtensionClass().getName();\n      throw new MojoExecutionException(\n          \"error running extension '\" + extensionName + \"': \" + ex.getMessage(), ex);\n","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java#L113-L149","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"<!-- before -->\n<from><platforms><platform><architecture>arm64</architecture></platform></platforms></from>\n<!-- after -->\n<from><platforms><platform><architecture>arm64</architecture><os>linux</os></platform></platforms></from>","handlingStrategy":"validation","validationCode":"for (Platform p : pomPlatforms) {\n  if (p.architecture == null || p.architecture.isBlank() || p.os == null || p.os.isBlank()) {\n    throw new IllegalArgumentException(\"Each <platform> needs non-empty <architecture> and <os>: \" + p);\n  }\n}","typeGuard":"boolean isValidPlatform(Platform p) { return p != null && notBlank(p.getArchitecture()) && notBlank(p.getOs()); }","tryCatchPattern":null,"preventionTips":["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."],"tags":["maven","jib","multi-platform","configuration"],"backgroundTag":"missing-required-config-field","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"}