apache/maven · warning

It is highly recommended to fix these problems because they

Error message

It is highly recommended to fix these problems because they threaten the stability of your build.

What it means

Second advisory line of the model-problem report, printed whenever the total problem count is positive. It is fixed text with no placeholders and states Maven's recommendation: the recorded problems threaten build stability even when the build succeeds. It is purely informational and pairs with the 'future Maven versions' warning that follows it.

Source

Thrown at impl/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java:93

                        "{} {} encountered while building the effective model for '{}' (use -e to see details)",
                        problemsCount,
                        (problemsCount == 1) ? "problem was" : "problems were",
                        result.getProjectId());

                if (request.isShowErrors()) { // this means -e or -X (as -X enables -e as well)
                    for (ModelProblem problem : result.getProblems()) {
                        String loc = ModelProblemUtils.formatLocation(problem, result.getProjectId());
                        LOGGER.warn("{}{}", problem.getMessage(), ((loc != null && !loc.isEmpty()) ? " @ " + loc : ""));
                    }
                }
            }
        }

        if (totalProblemsCount > 0) {
            LOGGER.warn("");
            LOGGER.warn("Total model problems reported: {}", totalProblemsCount);
            LOGGER.warn("");
            LOGGER.warn("It is highly recommended to fix these problems"
                    + " because they threaten the stability of your build.");
            LOGGER.warn("");
            LOGGER.warn("For this reason, future Maven versions might no"
                    + " longer support building such malformed projects.");
            LOGGER.warn("");
        }

        return projects;
    }
}

View on GitHub (pinned to e4093d4e12)

Solutions

  1. Do not suppress this line; instead reduce the problem total shown on the line above it to zero
  2. Use mvn -e to get the per-problem detail and fix each one
  3. Track model hygiene in code review: fail CI on any 'Total model problems reported' occurrence

Example fix

# before: tolerated warnings
# [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

# after: enforce zero model problems in CI
mvn -e clean install 2>&1 | tee build.log
! grep -q 'Total model problems reported' build.log || { echo 'model problems present'; exit 1; }
Defensive patterns

Strategy: validation

Validate before calling

# Do not ship builds that print the stability advisory
mvn clean verify > build.log 2>&1 || { tail -100 build.log; exit 1; }
! grep -q 'threaten the stability of your build' build.log || { echo 'model problems present'; exit 1; }

Prevention

When it happens

Trigger: Printed unconditionally after 'Total model problems reported: {}' when totalProblemsCount > 0; there is no separate condition that produces this line without the total line.

Common situations: Teams treating it as noise in CI logs; builds that pass today but rely on lenient model handling that later Maven releases turn into hard errors.

Related errors


AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21). Data as JSON: /api/errors/bcf1e55e4336cc7f. Report an issue: GitHub.