wilx opened a new pull request, #1337:
URL: https://github.com/apache/maven-assembly-plugin/pull/1337

   Fixes #1162.
   
   ## Summary
   
   Honor `<useAllReactorProjects>true</useAllReactorProjects>` independently of
   reactor ordering.
   
   The attached reproducer has a root aggregator that inherits from a BOM which
   is also part of the reactor. Maven therefore sorts the non-aggregating BOM
   before the root project. The assembly is produced by a distribution module
   and is expected to contain both reactor module JARs.
   
   ## Root cause
   
   `ModuleSetAssemblyPhase.getModuleProjects()` treated
   `reactorProjects.get(0)` as the aggregation root when
   `useAllReactorProjects` and `includeSubModules` were both enabled. When the
   first reactor project was the BOM, recursive module discovery returned no
   projects and the assembly failed with `archive cannot be empty`.
   
   When `useAllReactorProjects` is enabled, the implementation now starts with
   the complete ordered reactor and applies the existing include/exclude
   filters. Module discovery from the current project is unchanged when that
   option is disabled.
   
   The integration test reproduces the BOM-first ordering and verifies that the
   resulting archive contains both module JARs. A focused unit test covers the
   reactor-order-independent selection.
   
   ## Validation
   
   - Maven 3: `mvn -Prun-its clean verify`
     - 269 unit tests passed.
     - 151 Invoker builds passed.
   - Maven 4: focused `clean verify` for the setup project and MASSEMBLY-953
     reproducer.
     - 269 unit tests passed.
     - Both Invoker builds passed.
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
   - [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.
   - [ ] Each commit in the pull request should have a meaningful subject line 
and body.
     Note that commits might be squashed by a maintainer on merge.
   - [x] Write unit tests that match behavioral changes, where the tests fail 
if the changes to the runtime are not applied.
     This may not always be possible but is a best-practice.
   - [x] Run `mvn verify` to make sure basic checks pass.
     A more thorough check will be performed on your pull request automatically.
   - [x] You have run the integration tests successfully (`mvn -Prun-its 
verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [ ] 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)
   - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


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