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/09/24 05:56:48 UTC

(maven) branch maven-4.0.x updated: Fix #13230: make 'install' and 'deploy' depend on 'verify' in the concurrent lifecycle DAG (#13231)

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

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


The following commit(s) were added to refs/heads/maven-4.0.x by this push:
     new f3caba1843 Fix #13230: make 'install' and 'deploy' depend on 'verify' in the concurrent lifecycle DAG (#13231)
f3caba1843 is described below

commit f3caba1843ec7611ac0c92996f7156b1a19bb98e
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Sep 24 07:56:44 2026 +0200

    Fix #13230: make 'install' and 'deploy' depend on 'verify' in the concurrent lifecycle DAG (#13231)
    
    In the phase tree introduced for Maven 4, INSTALL and DEPLOY declared
    a dependency on PACKAGE only, not on VERIFY. This caused the concurrent
    builder (-b concurrent) to skip the VERIFY phase (unit tests, integration
    tests) when running 'mvn install', since no explicit edge existed between
    INSTALL and VERIFY in the DAG.
    
    The sequential builder was unaffected only by accident: its phase
    flattening happened to preserve the order, but this was not a semantic
    guarantee.
    
    Fix: change INSTALL and DEPLOY to declare after(VERIFY) instead of
    after(PACKAGE). VERIFY already depends transitively on BUILD (and
    therefore PACKAGE), so the full build order is preserved.
    
    Co-authored-by: Claude Sonnet 4.6 <no...@anthropic.com>
---
 .../org/apache/maven/internal/impl/DefaultLifecycleRegistry.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java b/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java
index b396824d28..3b64c19dc7 100644
--- a/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java
+++ b/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java
@@ -481,9 +481,9 @@ public Collection<Phase> phases() {
                                                     after(TEST_COMPILE),
                                                     after(TEST_RESOURCES),
                                                     dependencies(SCOPE_TEST, READY))),
-                                    phase(INTEGRATION_TEST)),
-                            phase(INSTALL, after(PACKAGE)),
-                            phase(DEPLOY, after(PACKAGE)))));
+                                    phase(INTEGRATION_TEST, after(BUILD))),
+                            phase(INSTALL, after(VERIFY)),
+                            phase(DEPLOY, after(VERIFY)))));
             // END SNIPPET: default
         }