gnodet opened a new pull request, #13233:
URL: https://github.com/apache/maven/pull/13233

   ## Summary
   
   Add `--skip-phases=<phase>[,<phase>...]` CLI option that suppresses all mojo 
executions bound to the listed lifecycle phases, without removing those phases 
from the lifecycle DAG.
   
   See also #13232 (fixes the lifecycle DAG: `install`/`deploy` → 
`after(verify)`).
   
   ## Motivation
   
   Resolves part of #13230. Plugin-agnostic replacement for ad-hoc skip 
properties (`-DskipTests`, `-DskipITs`, etc.) which only work for specific 
plugins and don't compose well across large multi-module builds.
   
   **Use cases:**
   - `mvn verify --skip-phases=test,integration-test` — skip all test execution 
plugin-agnostically
   - `mvn install --skip-phases=test` — install without running tests (e.g. for 
a dependency snapshot)
   - Release builds where CI already validated the commit: `mvn deploy 
--skip-phases=test,integration-test,verify`
   
   ## Semantics
   
   Phase skipping is mojo-level inhibition, not graph surgery. The phases 
remain in the lifecycle DAG; only their bound mojos are suppressed. Downstream 
phases (verify, install, deploy) still execute normally.
   
   ## Implementation
   
   - `MavenOptions`: `skippedPhases()` method
   - `CommonsCliMavenOptions` + `CLIManager`: `--skip-phases` / `-sp` option 
(comma-separated values)
   - `LayeredMavenOptions`: delegation via `collectListIfPresentOrEmpty`
   - `MavenInvoker.populateRequest()`: wires option → `MavenExecutionRequest`
   - `MavenExecutionRequest` / `DefaultMavenExecutionRequest`: 
`getSkippedPhases()` / `setSkippedPhases()`
   - `BuildPlanExecutor.plan()`: filters mojos in the concurrent builder
   - `DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions()`: 
filters mojos in the sequential builders (defensively handles null request for 
test compatibility)
   
   _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_
   


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

Reply via email to