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

   Fixes #14015: since #13582, a lifecycle mapping that a build extension 
(`<extensions>true</extensions>`) registers for an existing packaging is 
ignored, so groovy-eclipse-compiler builds produce empty jars. The 
3.10.2-SNAPSHOT is affected too; 3.9.x, 4.0.x and master look mappings up by 
hint and are not.
   
   The injected Sisu map lists every visible bean in rank order, with the 
extension ranked above core, so `jar` appears twice; `new HashMap<>(map)` keeps 
the last, lowest-ranked entry. `DefaultLifecyclePluginAnalyzer` now calls 
`lifecycleMappings.get(packaging)`, as on `maven-3.9.x`, and 
`DefaultLifecycles` keeps the first lifecycle per id, as the 3.10.0 per-id 
lookup did. Visibility filtering is unchanged: the map still filters on each 
iteration under the current TCCL, so the core-extension case from #13583 keeps 
working.
   
   For an extension that redefines `clean`, `default` or `site`, the 
extension's lifecycle wins, as in 3.10.0; 3.9.x kept core's.
   
   Verified: the groovy-eclipse-compiler reproducer from #14015 on 3.10.1 with 
this `maven-core` → `add-groovy-build-paths` runs, the class is compiled, 
`dependency:analyze-only` passes. Both new tests fail without the main-code 
change.
   
   - [x] Your pull request should address just one issue, without pulling in 
other changes.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Each commit in the pull request should have a meaningful subject line 
and body.
   - [x] Write unit tests that match behavioral changes, where the tests fail 
if the changes to the runtime are not applied.
   - [x] Run `mvn verify` to make sure basic checks pass (`maven-core`, 
`maven-embedder`).
   - [ ] You have run the [Core IT][core-its] successfully.
   
   - [x] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


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