{"record":{"id":"b333829816c7d64a","repo":"quarkusio/quarkus","slug":"failed-to-resolve-the-effective-model-of-coords","errorCode":null,"errorMessage":"Failed to resolve the effective model of ${coords.toCompactCoords()}","messagePattern":"Failed to resolve the effective model of (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/DefaultEffectiveModelResolver.java","lineNumber":157,"sourceCode":"                    modelResolver.addRepository(modelRepo, false);\n                } catch (Exception e) {\n                    throw new RuntimeException(\"Failed to add repository \" + modelRepo, e);\n                }\n            }\n        }\n\n        final ModelBuildingRequest req = new DefaultModelBuildingRequest();\n        req.setPomFile(pomFile);\n        req.setRawModel(rawModel);\n        req.setModelResolver(modelResolver);\n        req.setSystemProperties(System.getProperties());\n        req.setUserProperties(System.getProperties());\n        req.setModelCache(modelCache);\n\n        try {\n            return modelBuilder.build(req).getEffectiveModel();\n        } catch (ModelBuildingException e) {\n            throw new RuntimeException(\"Failed to resolve the effective model of \" + coords.toCompactCoords(), e);\n        }\n    }\n\n    static class BootstrapModelCache implements ModelCache {\n\n        private final RepositorySystemSession session;\n\n        private final RepositoryCache cache;\n\n        BootstrapModelCache(RepositorySystemSession session) {\n            this.session = session;\n            this.cache = session.getCache() == null ? new DefaultRepositoryCache() : session.getCache();\n        }\n\n        @Override\n        public Object get(String groupId, String artifactId, String version, String tag) {\n            return cache.get(session, new Key(groupId, artifactId, version, tag));\n        }","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/DefaultEffectiveModelResolver.java#L139-L175","documentation":"Thrown when the Maven model builder fails to produce the effective model for the given coordinates — the POM (and its parents) were fetched but model building itself failed. All accumulated ModelBuilding problems (syntax, inheritance, interpolation, plugin validation) are behind this error.","triggerScenarios":"modelBuilder.build(req) in resolveEffectiveModel throwing ModelBuildingException for a POM with invalid XML, unresolvable properties/parents, or non-existent profiles/plugins referenced during building.","commonSituations":"Hand-edited POMs with XML mistakes or undefined ${property} interpolation, cyclic parent relationships, parent POM versions that no longer resolve, POMs using unsupported Maven model versions.","solutions":["Read the cause chain (ModelBuildingException problems) — it names the exact POM line and problem","Fix the invalid POM content at the reported location (XML syntax, missing properties, bad parent)","Ensure all parents and imported BOMs of the POM are resolvable","Validate the POM with 'mvn validate' or 'mvn help:effective-pom' locally before resolving programmatically"],"exampleFix":"// before\n<version>${project.parent.version}-SNAPSHOT</version> // property typo breaks interpolation\n// after\n<version>1.0.0-SNAPSHOT</version>  // or fix the parent version reference","handlingStrategy":"try-catch","validationCode":"// pre-validate the POM with Maven before programmatic building\nProcess p = new ProcessBuilder(\"mvn\", \"-q\", \"validate\", \"-f\", pomFile.toString()).inheritIO().start();\nif (p.waitFor() != 0) throw new IllegalStateException(\"POM fails mvn validate: \" + pomFile);","typeGuard":null,"tryCatchPattern":"try {\n    Model m = modelResolver.resolveEffectiveModel(coords);\n} catch (RuntimeException e) {\n    Throwable c = e.getCause();\n    if (c instanceof ModelBuildingException mbe) {\n        mbe.getProblems().forEach(pr -> logger.error(pr.getMessage() + \" @ \" + pr.getLocation()));\n    }\n    throw e;\n}","preventionTips":["Run mvn help:effective-pom locally to catch model problems early","Fix reported interpolation/inheritance problems at the named POM location","Keep parent POMs and BOMs resolvable at declared versions"],"tags":["maven","pom","model-building"],"backgroundTag":"pom-model-building-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}