MartinKanters commented on a change in pull request #373:
URL: https://github.com/apache/maven/pull/373#discussion_r491153867



##########
File path: 
maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
##########
@@ -361,76 +406,35 @@ private File getReactorDirectory( MavenExecutionRequest 
request )
         throws ProjectBuildingException
     {
         MavenExecutionRequest request = session.getRequest();
-
         request.getProjectBuildingRequest().setRepositorySession( 
session.getRepositorySession() );
 
-        List<MavenProject> projects = new ArrayList<>();
+        List<ProjectCollectionStrategy> projectCollectionStrategies = 
Arrays.asList(
+                projectlessCollectionStrategy, // 1. Collect project for 
invocation without a POM.
+                multiModuleCollectionStrategy, // 2. Collect projects for all 
modules in the multi-module project.
+                requestPomCollectionStrategy   // 3. Collect projects for 
explicitly requested POM.
+        );
 
-        // We have no POM file.
-        //
-        if ( request.getPom() == null )
+        for ( ProjectCollectionStrategy strategy : projectCollectionStrategies 
)

Review comment:
       @mthmulders and I discussed it offline, and we agree. Let's go for more 
readability and explictness. 
   Can you please check the new commit whenever you have some time? 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to