{"record":{"id":"5f25fb8e599d201a","repo":"apache/maven","slug":"error-5f25fb","errorCode":null,"errorMessage":"{}{}","messagePattern":"\\{\\}\\{\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"impl/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java","lineNumber":83,"sourceCode":"        long totalProblemsCount = 0;\n\n        for (ProjectBuildingResult result : results) {\n            projects.add(result.getProject());\n\n            int problemsCount = result.getProblems().size();\n            totalProblemsCount += problemsCount;\n            if (problemsCount != 0 && LOGGER.isWarnEnabled()) {\n                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;","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java#L65-L101","documentation":"This is the per-problem detail line that DefaultProjectsSelector prints for each ModelProblem when request.isShowErrors() is true (i.e. -e or -X, since -X implies -e). The first placeholder is the problem's own message; the second is ' @ <location>' formatted by ModelProblemUtils.formatLocation() with the projectId, or empty when the problem has no location. It appears only under the '{}' problem-count warning for the same project.","triggerScenarios":"Any reactor build run with -e or -X where at least one ProjectBuildingResult has problems; one line is emitted per problem, in the order they were collected during model building of that project.","commonSituations":"Developer runs mvn -e to diagnose a build failure and sees the raw model problem text; messages like 'Unknown packaging: bundle' or 'Invalid version' are surfaced here with the exact POM file and line.","solutions":["Read the problem text and the @ location suffix, then fix the named POM at the given line","For problems without a location, run with -X for the full stack context of the model builder","Re-run the build after each fix to confirm the problem count drops to zero"],"exampleFix":"# before\nmvn clean install\n# [WARNING] 2 problems encountered while building the effective model for 'com.example:app'\n\n# after: details with location are printed\nmvn -e clean install\n# [WARNING] 'dependencies.dependency.version' is missing @ com.example:app:jar:1.0, line 42, column 21","handlingStrategy":"validation","validationCode":"// Fail CI when any model problem line would be printed\nList<ModelProblem> problems = result.getProblems();\nif (!problems.isEmpty()) {\n    problems.forEach(p -> log.warn(\"{} @ {}\", p.getMessage(),\n            ModelProblemUtils.formatLocation(p, result.getProjectId())));\n    throw new IllegalStateException(\"effective model has \" + problems.size() + \" problem(s)\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use -e or -X whenever a build prints model-problem summaries so the detail lines appear","Parse the 'message @ file:line' format in CI tooling to auto-create tickets for model problems","Keep the log level for org.apache.maven at WARN or lower in CI to never lose these lines"],"tags":["maven","model-building","diagnostics","logging"],"backgroundTag":"maven-model-problems","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}