gnodet-bot commented on code in PR #298:
URL: https://github.com/apache/maven/pull/298#discussion_r4020023835
##########
maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java:
##########
@@ -342,37 +342,40 @@ private List<MavenProject>
getProjectsForMavenReactor(MavenSession session) thro
}
List<File> files = Arrays.asList(request.getPom().getAbsoluteFile());
- collectProjects(projects, files, request);
+ session.setModelProblems(collectProjects(projects, files, request));
Review Comment:
⚠️ **Pomless path above this line still never calls `setModelProblems()`.**
The `request.getPom() == null` branch (lines ~333–341) returns early without
setting model problems on the session. Since `modelProblems` defaults to
`Collections.emptyList()`, a pomless build that encounters problems silently
exposes an empty list. Add `session.setModelProblems(Collections.emptyList())`
before that early `return projects;` (an empty list is correct for the
standalone POM case — it only needs to be an explicit call to make the intent
clear and to make the contract testable).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]