{"record":{"id":"82d70fb4ebb28da0","repo":"GoogleContainerTools/jib","slug":"from-platforms-contains-a-platform-configuratio-82d70f","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/BuildTarMojo.java","lineNumber":112,"sourceCode":"              new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))\n          .runBuild();\n\n    } catch (InvalidAppRootException ex) {\n      throw new MojoExecutionException(\n          \"<container><appRoot> is not an absolute Unix-style path: \" + ex.getInvalidPathValue(),\n          ex);\n\n    } catch (InvalidContainerizingModeException ex) {\n      throw new MojoExecutionException(\n          \"invalid value for <containerizingMode>: \" + ex.getInvalidContainerizingMode(), ex);\n\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(","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildTarMojo.java#L94-L130","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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."],"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":"String arch = \"arm64\", os = null; // values intended for <platform>\nif (arch == null || arch.isBlank() || os == null || os.isBlank()) {\n  throw new IllegalArgumentException(\"platform requires both <architecture> and <os>\");\n}","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoExecutionException e) { if (e.getMessage().startsWith(\"<from><platforms>\")) { /* add missing architecture/os fields */ } throw e; }","preventionTips":["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"],"tags":["maven","jib","platform","multi-arch","configuration"],"backgroundTag":"schema-validation-failed","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"}