goutamadwant opened a new pull request, #13319: URL: https://github.com/apache/maven/pull/13319
## Summary A Maven 4 project extension can contribute a packaging through `PackagingProvider`, but `DefaultPackagingRegistry` previously looked only for a legacy `LifecycleMapping`. Even with the extension loaded, a project using the contributed packaging failed with `Unknown packaging: app-client`. Resolve packaging providers through the active project lookup, preserving project-extension visibility. Keep constructor-injected providers and the existing legacy lifecycle-mapping fallback. Closes #13306. ## Validation - Reproduced the failure before the change with a Maven 4 plugin extension contributing `app-client`. - Added unit coverage for provider lookup, changing project visibility, constructor-injected providers, and the legacy fallback. - Added a Core IT that builds the extension, validates a project using its packaging, and confirms a sibling project without the extension cannot use it. - Full `-Prun-its verify` reactor passed before an unrelated upstream dependency-version rebase: 1,081 Core IT tests, 0 failures, 0 errors, 43 skipped. - Rebuilt Maven after the rebase and reran the full reactor with the #13306 Core IT selected; the build and IT passed. ## Checklist - [x] This pull request addresses one issue without unrelated changes. - [x] The description explains what changed and why. - [x] The commit has a meaningful subject and body. - [x] Unit tests cover the behavioral change and failed before the fix. - [x] Maven reactor verification passed. - [x] Core IT validation passed. - [ ] I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004. - [ ] In any other case, I have filed an Apache Individual Contributor License Agreement. -- 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]
