mthmulders commented on a change in pull request #446:
URL: https://github.com/apache/maven/pull/446#discussion_r583679349



##########
File path: 
maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
##########
@@ -242,21 +274,17 @@ public DefaultGraphBuilder( BuildResumptionDataRepository 
buildResumptionDataRep
     {
         List<MavenProject> result = projects;
 
-        if ( !request.getExcludedProjects().isEmpty() )
+        ProjectActivation projectActivation = request.getProjectActivation();
+        Set<String> requiredSelectors = 
projectActivation.getRequiredInactiveProjectSelectors();
+        Set<String> optionalSelectors = 
projectActivation.getOptionalInactiveProjectSelectors();
+        if ( !requiredSelectors.isEmpty() || !optionalSelectors.isEmpty() )
         {
-            File reactorDirectory = getReactorDirectory( request );
+            Set<MavenProject> excludedProjects = new HashSet<>( 
requiredSelectors.size() + optionalSelectors.size() );
+            excludedProjects.addAll( getProjectsBySelectors( request, 
projects, requiredSelectors, true ) );
+            excludedProjects.addAll( getProjectsBySelectors( request, 
projects, optionalSelectors, false ) );

Review comment:
       We discussed this with @rfscholte and the idea is to:
   
   1. If the user gives conflicting settings for one project, they will cancel 
each other out: `-pl :a,-:a,:b` will yield selection of `:b`.
   2. When the above rule yields no selected projects (everything is cancelled 
out), we throw ["empty project list" 
message](https://github.com/apache/maven/pull/446#discussion_r577123679).
   3. When `?:a,:a` is specified, `:a` wins because it's "stronger".
   4. When `a,:a` is specified (two selectors that yield the same module) the 
above rules apply as they refer to the same module. It is not considered a 
failure or error.
   
   What are your thoughts on this?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to