You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2026/10/16 08:48:59 UTC

(maven) branch master updated: fix: address review nits in BuildPlan merge method (#13548)

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new 14568289f1 fix: address review nits in BuildPlan merge method (#13548)
14568289f1 is described below

commit 14568289f15bf79edf58ff0d7bcfa65d2daa9965
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Fri Oct 16 10:48:53 2026 +0200

    fix: address review nits in BuildPlan merge method (#13548)
    
    - Fix comment to only mention $plan$ (the only key actually checked)
    - Filter skipped steps in fallback frontier to stay consistent with
      the primary frontier computation
    
    Follow-up to #13532
    
    Co-authored-by: Claude Opus 4.6 (1M context) <no...@anthropic.com>
---
 .../org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java b/impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java
index 211712419e..421955ebbc 100644
--- a/impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java
+++ b/impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java
@@ -96,8 +96,8 @@ public void then(BuildPlan step) {
     }
 
     private Map<String, BuildStep> merge(Map<String, BuildStep> org, Map<String, BuildStep> add) {
-        // When add contains infrastructure steps ($plan$, $setup$, $teardown$), this merge
-        // is from computeForkPlan (execution plan merged into a fork). In that case, use the
+        // When add contains the infrastructure $plan$ step, this merge is from
+        // computeForkPlan (execution plan merged into a fork). In that case, use the
         // original terminal-step chaining to avoid creating cycles with the frontier approach.
         boolean isSegmentMerge = !add.containsKey(BuildStep.PLAN);
 
@@ -119,6 +119,7 @@ private Map<String, BuildStep> merge(Map<String, BuildStep> org, Map<String, Bui
                     .toList();
             if (activeFrontier.isEmpty()) {
                 activeFrontier = org.values().stream()
+                        .filter(b -> !b.skip.get())
                         .filter(b -> b.successors.isEmpty())
                         .toList();
             }