{"record":{"id":"b94d55d9c43ce5fa","repo":"apache/maven","slug":"failed-to-process-pom-for-artifact-getid","errorCode":null,"errorMessage":"Failed to process POM for \" + artifact.getId() + \": \" + missingParentPom.getMessage()","messagePattern":"Failed to process POM for \" \\+ artifact\\.getId\\(\\) \\+ \": \" \\+ missingParentPom\\.getMessage\\(\\)","errorType":"exception","errorClass":"ArtifactMetadataRetrievalException","httpStatus":null,"severity":"error","filePath":"compat/maven-compat/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java","lineNumber":556,"sourceCode":"                    configuration.setRemoteRepositories(repositoryRequest.getRemoteRepositories());\n                    configuration.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL);\n                    configuration.setProcessPlugins(false);\n                    configuration.setRepositoryMerging(ProjectBuildingRequest.RepositoryMerging.REQUEST_DOMINANT);\n                    MavenSession session = legacySupport.getSession();\n                    if (session != null) {\n                        configuration.setSystemProperties(session.getSystemProperties());\n                        configuration.setUserProperties(session.getUserProperties());\n                    } else {\n                        configuration.setSystemProperties(getSystemProperties());\n                        configuration.setUserProperties(new Properties());\n                    }\n                    configuration.setRepositorySession(legacySupport.getRepositorySession());\n\n                    project = projectBuilder.build(pomArtifact, configuration).getProject();\n                } catch (ProjectBuildingException e) {\n                    ModelProblem missingParentPom = hasMissingParentPom(e);\n                    if (missingParentPom != null) {\n                        throw new ArtifactMetadataRetrievalException(\n                                \"Failed to process POM for \" + artifact.getId() + \": \" + missingParentPom.getMessage(),\n                                missingParentPom.getException(),\n                                artifact);\n                    }\n\n                    String message;\n\n                    if (isMissingPom(e)) {\n                        message = \"Missing POM for \" + artifact.getId();\n                    } else if (isNonTransferablePom(e)) {\n                        throw new ArtifactMetadataRetrievalException(\n                                \"Failed to retrieve POM for \" + artifact.getId() + \": \"\n                                        + e.getCause().getMessage(),\n                                e.getCause(),\n                                artifact);\n                    } else {\n                        message = \"Invalid POM for \" + artifact.getId()\n                                + \", transitive dependencies (if any) will not be available\"","sourceCodeStart":538,"sourceCodeEnd":574,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/compat/maven-compat/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java#L538-L574","documentation":"Thrown by MavenMetadataSource when it tries to build the MavenProject of an artifact (to read its transitive dependencies) and project building fails specifically because the POM references a parent that cannot be resolved. hasMissingParentPom() extracts the ModelProblem for the absent parent, and the ArtifactMetadataRetrievalException carries that problem's original exception plus the artifact coordinates.","triggerScenarios":"retrieve() is called for artifact X; projectBuilder.build on X's POM fails; the failure contains a missing-parent problem (parent POM not in any repo, wrong parent version, or parent itself unreachable). Common shapes: <parent><version> pointing at a version never published, or a corporate parent not reachable in the current environment.","commonSituations":"Company parent POMs hosted on a repository not configured in settings.xml; aggregator children checked out without the parent and offline mode on; parent version bump published before children (or never); mirrors blocking the repo that hosts the parent.","solutions":["Verify the parent groupId:artifactId:version exists in a repository you actually use (search Central / your Nexus)","Add the missing repository to settings.xml (or fix the mirror/mirrorOf rules excluding it)","If offline (-o), remove it or pre-seed the local repo with the parent","Delete the child's cached directory in ~/.m2/repository and retry to rule out corrupt metadata","Fix the parent version in the POM if it was typo'd or never released"],"exampleFix":"<!-- before -->\n<parent>\n  <groupId>com.corp</groupId><artifactId>corp-parent</artifactId>\n  <version>4.2.1</version> <!-- never published -->\n</parent>\n<!-- after -->\n<parent>\n  <groupId>com.corp</groupId><artifactId>corp-parent</artifactId>\n  <version>4.2.0</version> <!-- released version available in repos -->\n</parent>","handlingStrategy":"try-catch","validationCode":"// Before resolving, confirm the parent coordinates exist in your effective repos\n// (quick check: artifact exists at <repoUrl>/<groupId as path>/<artifactId>/<version>/)","typeGuard":null,"tryCatchPattern":"try {\n    ArtifactMetadataSource.retrieve(...);\n} catch (ArtifactMetadataRetrievalException e) {\n    if (e.getMessage().startsWith(\"Failed to process POM\")) {\n        // parent of a transitive dep is unresolvable: exclude or pin\n        addExclusion(artifact, failingDependency);\n    }\n}","preventionTips":["Publish parent POMs before children (release order matters)","Ensure repositories hosting parents are configured and mirror-exempt","Use dependencyManagement to pin versions whose parents are problematic"],"tags":["maven","pom","parent-pom","resolution","transitive"],"backgroundTag":"missing-parent-pom","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}