apache/maven · warning
{} {} encountered while building the effective model for {}
Error message
{} {} encountered while building the effective model for {} during {} (use -X to see details) What it means
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.
Source
Thrown at compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java:257
List<ModelProblem> problems = modelResult.getProblems();
if (logger.isDebugEnabled()) {
String problem = (problems.size() == 1) ? "problem" : "problems";
String problemPredicate = problem + ((problems.size() == 1) ? " was" : " were");
StringBuilder message = new StringBuilder(String.format(
"%s %s encountered while building the effective model for %s during %s\n",
problems.size(),
problemPredicate,
request.getArtifact(),
RequestTraceHelper.interpretTrace(true, request.getTrace())));
message.append(StringUtils.capitalizeFirstLetter(problem));
for (ModelProblem modelProblem : problems) {
message.append(String.format(
"\n* %s @ %s",
modelProblem.getMessage(), ModelProblemUtils.formatLocation(modelProblem, null)));
}
logger.warn(message.toString());
} else {
logger.warn(
"{} {} encountered while building the effective model for {} during {} (use -X to see details)",
problems.size(),
(problems.size() == 1) ? "problem was" : "problems were",
request.getArtifact(),
RequestTraceHelper.interpretTrace(false, request.getTrace()));
}
}
model = modelResult.getEffectiveModel();
} catch (ModelBuildingException e) {
for (ModelProblem problem : e.getProblems()) {
if (problem.getException() instanceof UnresolvableModelException unresolvableModelException) {
result.addException(unresolvableModelException);
throw new ArtifactDescriptorException(result);
}
}
invalidDescriptor(session, trace, a, e);
if ((getPolicy(session, a, request) & ArtifactDescriptorPolicy.IGNORE_INVALID) != 0) {
return null;View on GitHub (pinned to e4093d4e12)
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.
Example fix
# before mvn install # after mvn install -X # shows each '* <problem> @ <pom location>' line for the artifact named in the warning
Defensive patterns
Strategy: validation
Validate before calling
mvn -q dependency:resolve -Dmaven.wagon.http.retryHandler.count=3 >/dev/null && echo 'resolvable'
Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- %s %s encountered while building the effective model for %s
- Unable to build project
- \n\tArtifact {} retains local artifactScope '{}' overriding
- Repository list contains duplicate entries. Each repository
- Repository list contains null entries. All repository entrie
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/c86b42ffc0b23e94.
Report an issue: GitHub.