{"record":{"id":"c86b42ffc0b23e94","repo":"apache/maven","slug":"encountered-while-building-the-effective-mod","errorCode":null,"errorMessage":"{} {} encountered while building the effective model for {} during {} (use -X to see details)","messagePattern":"(.+?) (.+?) encountered while building the effective model for (.+?) during (.+?) \\(use -X to see details\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java","lineNumber":257,"sourceCode":"                    List<ModelProblem> problems = modelResult.getProblems();\n                    if (logger.isDebugEnabled()) {\n                        String problem = (problems.size() == 1) ? \"problem\" : \"problems\";\n                        String problemPredicate = problem + ((problems.size() == 1) ? \" was\" : \" were\");\n                        StringBuilder message = new StringBuilder(String.format(\n                                \"%s %s encountered while building the effective model for %s during %s\\n\",\n                                problems.size(),\n                                problemPredicate,\n                                request.getArtifact(),\n                                RequestTraceHelper.interpretTrace(true, request.getTrace())));\n                        message.append(StringUtils.capitalizeFirstLetter(problem));\n                        for (ModelProblem modelProblem : problems) {\n                            message.append(String.format(\n                                    \"\\n* %s @ %s\",\n                                    modelProblem.getMessage(), ModelProblemUtils.formatLocation(modelProblem, null)));\n                        }\n                        logger.warn(message.toString());\n                    } else {\n                        logger.warn(\n                                \"{} {} encountered while building the effective model for {} during {} (use -X to see details)\",\n                                problems.size(),\n                                (problems.size() == 1) ? \"problem was\" : \"problems were\",\n                                request.getArtifact(),\n                                RequestTraceHelper.interpretTrace(false, request.getTrace()));\n                    }\n                }\n                model = modelResult.getEffectiveModel();\n            } catch (ModelBuildingException e) {\n                for (ModelProblem problem : e.getProblems()) {\n                    if (problem.getException() instanceof UnresolvableModelException unresolvableModelException) {\n                        result.addException(unresolvableModelException);\n                        throw new ArtifactDescriptorException(result);\n                    }\n                }\n                invalidDescriptor(session, trace, a, e);\n                if ((getPolicy(session, a, request) & ArtifactDescriptorPolicy.IGNORE_INVALID) != 0) {\n                    return null;","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java#L239-L275","documentation":"Same condition as the detailed variant, logged when debug output is disabled (a normal mvn run): while reading an artifact descriptor, model building for that dependency's POM hit problems, but an effective model was still produced. Maven summarizes the count and the phase, and points you to -X for the details. It is a warning, not a failure: resolution proceeds with the recovered model.","triggerScenarios":"Default (non-debug) run resolving a dependency whose POM has model problems: unresolvable parent, bad dependencyManagement import, or invalid elements tolerated by lenient validation. Fired from DefaultArtifactDescriptorReader during dependency resolution or artifact descriptor load.","commonSituations":"Broken or partially published third-party POMs in corporate proxies; snapshot POMs with parents that were never installed; repository corruption after interrupted downloads; builds that work at work but fail behind restricted mirrors.","solutions":["Re-run with -X to switch to the detailed message listing each problem and its POM location.","Identify the artifact named in the message and check its POM (parent, imports) with mvn help:effective-pom on a copy, or open it in the local repository under ~/.m2/repository.","Fix by pinning a different version in dependencyManagement, excluding the dependency, or fixing its parent chain if you own it.","Clear a possibly corrupted local copy with mvn dependency:purge-local-repository -DreResolve=true (or delete that path) and retry with -U."],"exampleFix":"# before\nmvn install\n# after\nmvn install -X   # shows each '* <problem> @ <pom location>' line for the artifact named in the warning","handlingStrategy":"validation","validationCode":"mvn -q dependency:resolve -Dmaven.wagon.http.retryHandler.count=3 >/dev/null && echo 'resolvable'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat any 'problems were encountered' warning as debt: rerun -X once and file the offending POM","Keep mirrors/proxies complete: verify the full parent chain downloads for new dependencies","Purge suspect artifacts from the local repo rather than working around warnings"],"tags":["maven","pom","dependency-resolution","model-building"],"backgroundTag":"invalid-pom-model","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}