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

   ## Summary
   
   Re-enable `MavenITmng1088ReactorPluginResolutionTest`, which was disabled 
pending the concurrent builder work (MNG-7977).
   
   ## Background
   
   [MNG-1088](https://issues.apache.org/jira/browse/MNG-1088) covers the case 
where a plugin is built and used within the same multiproject build. In Maven 
3, this worked via a fallback: if the plugin's JAR hadn't been produced yet, 
Maven would resolve it from the repository. This fallback was fragile and could 
cause inconsistencies (MNG-7977).
   
   ## How the Concurrent Builder Fixes This
   
   Maven 4's `BuildPlanExecutor` handles this correctly in `computePlan()`:
   
   ```java
   // If a project declares a plugin that is itself part of the reactor,
   // require the plugin project to reach 'ready' before planning the consumer
   MavenProject pluginProject = reactorGavs.get(gav(plugin));
   if (pluginProject != null) {
       plan.requiredStep(project, 
PLAN).executeAfter(plan.requiredStep(pluginProject, READY));
   }
   ```
   
   The `ready` phase sits after `compile` and `resources`, so the plugin's 
classes are compiled and packaged before the consuming project is planned and 
executed — regardless of which lifecycle phase the user requested on the 
command line.
   
   ## Verification
   
   IT passes against `4.0.0-SNAPSHOT`:
   
   ```
   Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
   Time elapsed: 9.579 s -- in 
org.apache.maven.it.MavenITmng1088ReactorPluginResolutionTest
   BUILD SUCCESS
   ```
   
   The test description is updated to reflect the Maven 4 semantics (proper 
scheduling via the concurrent build plan, rather than fallback to repository 
resolution).
   
   ---
   _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