gnodet opened a new issue, #13514:
URL: https://github.com/apache/maven/issues/13514

   **Parent:** #13499 | **Depends on:** #13464, #13462
   
   ## Problem
   
   There is no v4 API/SPI equivalent of `AbstractMavenLifecycleParticipant` or
   `ProjectExecutionListener`. The v4 `Listener`/`Event` mechanism is too 
generic —
   it fires untyped `Event` objects without structured callbacks or mutable 
project access.
   
   ## Who needs this
   
   - **Tycho**: `TychoMavenLifecycleParticipant.afterProjectsRead()` resolves 
the P2 target
     platform and injects OSGi dependencies into every `MavenProject` before 
any mojo executes.
     `TychoProjectExecutionListener.beforeProjectLifecycleExecution()` does 
lazy per-project
     P2 resolution with execution plan inspection.
   - **m2e**: Invokes lifecycle participants (including Tycho's) when 
reading/refreshing
     workspace projects. Both a consumer and invoker of this SPI.
   
   ## What's needed
   
   A lifecycle participation SPI in `org.apache.maven.api.spi` with:
   - `afterProjectsRead` equivalent — access to the full reactor project list 
with ability
     to mutate project dependencies (via `ProjectManager`)
   - Per-project before/after execution callbacks — with access to the 
execution plan
     (list of `MojoExecution` for the project)
   - Session end callback — for cleanup/disposal
   - Session cloning or equivalent for parallel work
   
   ## Notes
   
   - #13464 (lifecycle engine) and #13462 (session inversion) cover the 
internal migration
     but the *public SPI contract* for external extensions isn't explicitly 
scoped
   - `LegacySupport` usage in listeners should be obsoleted by proper session 
scoping (#13462)
   
   <!-- AI-Agent-Disclosure -->
   > 🤖 Drafted with Claude Code (Claude Opus 4.6, interactive mode). Reviewed 
and confirmed by @gnodet before submission.


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