hboutemy opened a new issue, #12331: URL: https://github.com/apache/maven/issues/12331
### Affected version 4.0.0-RC5 ### Bug description found while working on https://github.com/apache/maven-scm-publish-plugin/pull/152#issuecomment-4717823539 for default lifecycle, Maven 4 works as Maven 3: goal binding from `pom.xml` runs after lifecycle one but for `site` or `clean`, Maven 4 runs binding from `pom.xml` first reproducer: [pom.xml](https://github.com/user-attachments/files/29162847/pom.xml) with Maven 3: ``` ❯ mvn package && mvn -V clean Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1) Maven home: /home/herve/.sdkman/candidates/maven/3.9.12 Java version: 25, vendor: Azul Systems, Inc., runtime: /home/herve/.sdkman/candidates/java/25-zulu Default locale: fr_FR, platform encoding: UTF-8 OS name: "linux", version: "6.8.0-124-generic", arch: "amd64", family: "unix" [INFO] Scanning for projects... [INFO] [INFO] ----------------< org.apache.maven.its:test-lifecycle >----------------- [INFO] Building Test lifecycle bindings vs added ones 1.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- clean:3.2.0:clean (default-clean) @ test-lifecycle --- [INFO] Deleting /home/herve/dev/maven/sources/plugins/tools/target [INFO] [INFO] --- antrun:3.2.0:run (target) @ test-lifecycle --- [INFO] Executing tasks ``` (failure expected) with Maven 4: ``` ❯ mvn package && mvn -V clean Apache Maven 4.0.0-SNAPSHOT (61b7c60e4211f024564ff89964dac825afb3146e) Maven home: /home/herve/.sdkman/candidates/maven/4.0.0-SNAPSHOT Java version: 25, vendor: Azul Systems, Inc., runtime: /home/herve/.sdkman/candidates/java/25-zulu Default locale: fr_FR, platform encoding: UTF-8, time zone: Europe/Paris OS name: "linux", version: "6.8.0-124-generic", arch: "amd64", family: "unix" [INFO] Scanning for projects... [INFO] [INFO] -----------------------------------------< org.apache.maven.its:test-lifecycle >------------------------------------------ [INFO] Building Test lifecycle bindings vs added ones 1.0-SNAPSHOT [INFO] from pom.xml [INFO] ---------------------------------------------------------[ jar ]---------------------------------------------------------- [INFO] [INFO] --- antrun:3.2.0:run (target) @ test-lifecycle --- [INFO] Executing tasks [INFO] Executed tasks [INFO] [INFO] --- clean:3.4.0:clean (default-clean) @ test-lifecycle --- [INFO] Deleting /home/herve/dev/maven/sources/plugins/tools/target ``` same results with `mvn site` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
