gnodet commented on code in PR #1038:
URL: https://github.com/apache/maven/pull/1038#discussion_r1136715122


##########
maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java:
##########
@@ -90,18 +89,17 @@ public 
LifecycleDependencyResolver(ProjectDependenciesResolver projectDependenci
 
     public static List<MavenProject> getProjects(MavenProject project, 
MavenSession session, boolean aggregator) {
         if (aggregator && project.getCollectedProjects() != null) {
-            return 
getProjectAndSubModules(project).collect(Collectors.toList());
+            List<MavenProject> downstreamProjects = 
session.getProjectDependencyGraph()
+                    .getDownstreamProjects(project, true); // sorted but more 
than needed
+            List<MavenProject> collectedProjects = 
project.getCollectedProjects(); // not sorted but what we need

Review Comment:
   I think I misread the code at 
https://github.com/apache/maven/blob/8150c62749a637a98fbb9489fb8162034956220b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java#L626-L631
   
   Reading more closely, the `projects` list will contain all submodules 
recursively...



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to