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

   ## Summary
   
   Add opt-in merging of Java module descriptors with:
   
   ```xml
   <moduleInfoMode>merge</moduleInfoMode>
   ```
   
   The default remains `discard`, preserving the plugin's existing behavior.
   
   The primary project artifact remains authoritative for the module identity 
and
   public boundary. Requirements on embedded modules are removed, external
   requirements and service declarations are combined, and retained package and
   class names follow configured relocations.
   
   The implementation also handles multi-release inputs and outputs. It 
generates
   cumulative release views, rebuilds `ModulePackages`, preserves safe module
   metadata, and raises the modular floor when a provider or transitive platform
   requirement cannot exist in the earliest release. When the floor is raised,
   earlier runtimes see an automatic module with a stable
   `Automatic-Module-Name`, and the build emits detailed reasons for the change.
   
   Filtering or minimization that removes a primary export, open package, main
   class, or provider now fails rather than producing an invalid descriptor.
   
   Documentation and regression coverage include root-only, versioned-only, and
   combined root-plus-versioned descriptor outputs.
   
   Fixes #629.
   
   JIRA: [MSHADE-265](https://issues.apache.org/jira/browse/MSHADE-265)
   
   ## Validation
   
   - `mvn clean verify`: 79 tests passed.
   - `mvn -Prun-its clean verify`: 85 integration projects passed; one was
     skipped by its JRE-version condition.
   - The focused `module-info-merge` integration test passed with Maven 3.6.3,
     Maven 3.9.16, and Maven 4.0.0-rc-5.
   - Site generation passed.
   - The generated modular JAR passed `jar --validate` and was inspected with
     `jar --describe-module`.
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
    - [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MSHADE) filed
          for the change (usually before you start working on it). Trivial 
changes like typos do not
          require a JIRA issue. Your pull request should address just this 
issue, without
          pulling in other changes.
    - [x] Each commit in the pull request should have a meaningful subject line 
and body.
    - [x] Format the pull request title like `[MSHADE-XXX] - Fixes bug in 
ApproximateQuantiles`,
          where you replace `MSHADE-XXX` with the appropriate JIRA issue. Best 
practice
          is to use the JIRA issue title in the pull request title and in the 
first line of the
          commit message.
    - [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [x] Run `mvn clean 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 clean 
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.
   
    - [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)
   
    - [ ] 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