{"record":{"id":"c2d201a46f0847d5","repo":"apache/maven","slug":"total-model-problems-reported","errorCode":null,"errorMessage":"Total model problems reported: {}","messagePattern":"Total model problems reported: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"impl/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java","lineNumber":91,"sourceCode":"                LOGGER.warn(\"\");\n                LOGGER.warn(\n                        \"{} {} encountered while building the effective model for '{}' (use -e to see details)\",\n                        problemsCount,\n                        (problemsCount == 1) ? \"problem was\" : \"problems were\",\n                        result.getProjectId());\n\n                if (request.isShowErrors()) { // this means -e or -X (as -X enables -e as well)\n                    for (ModelProblem problem : result.getProblems()) {\n                        String loc = ModelProblemUtils.formatLocation(problem, result.getProjectId());\n                        LOGGER.warn(\"{}{}\", problem.getMessage(), ((loc != null && !loc.isEmpty()) ? \" @ \" + loc : \"\"));\n                    }\n                }\n            }\n        }\n\n        if (totalProblemsCount > 0) {\n            LOGGER.warn(\"\");\n            LOGGER.warn(\"Total model problems reported: {}\", totalProblemsCount);\n            LOGGER.warn(\"\");\n            LOGGER.warn(\"It is highly recommended to fix these problems\"\n                    + \" because they threaten the stability of your build.\");\n            LOGGER.warn(\"\");\n            LOGGER.warn(\"For this reason, future Maven versions might no\"\n                    + \" longer support building such malformed projects.\");\n            LOGGER.warn(\"\");\n        }\n\n        return projects;\n    }\n}\n","sourceCodeStart":73,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java#L73-L104","documentation":"Trailer of the model-problem report: after all projects have been scanned, DefaultProjectsSelector sums every project's problem counts and, when the total is greater than zero, prints this line with the aggregate number. It exists so a multi-module build with many small warnings is still visible as a total. It is always followed by the two advisory lines about build stability and future Maven support.","triggerScenarios":"Any build via the projects collector where totalProblemsCount > 0 after iterating all ProjectBuildingResults, i.e. at least one model problem anywhere in the reactor, even if all are warnings.","commonSituations":"Large multi-module builds where each module contributes one or two benign warnings; threshold-based CI checks that fail the build when the reported total exceeds a limit.","solutions":["Run with -e to enumerate the individual problems and the projects that own them","Drive the total to zero by fixing the cited problems module by module","If a problem is unavoidable (third-party parent POM), pin a corrected version or override the offending model section in your own POM"],"exampleFix":"# before: only the total is known\nmvn clean install\n# [WARNING] Total model problems reported: 5\n\n# after: attribute problems to modules and fix them\nmvn -e clean install 2>&1 | grep 'problem.*encountered'","handlingStrategy":"validation","validationCode":"# Enforce zero total model problems in CI (bash)\nmvn -e clean verify 2>&1 | tee build.log\nif grep -q 'Total model problems reported' build.log; then\n  echo '::error::Maven reported model problems'; exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat the total-problems line as a quality gate; zero is the only good number","Track the count trend per build in CI metrics to catch new problems early","Audit newly added POM sections with mvn -e help:effective-pom before merge"],"tags":["maven","model-building","summary","diagnostics"],"backgroundTag":"maven-model-problems","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}