gwenneg opened a new pull request, #488:
URL: https://github.com/apache/maven-wrapper/pull/488

   Adds two optional properties to `maven-wrapper.properties`, next to the 
SHA-256 ones:
   
   - `distributionSha512Sum`: the SHA-512 sum of the Maven distribution
   - `wrapperSha512Sum`: the SHA-512 sum of `maven-wrapper.jar`
   
   Apache publishes SHA-512 sums for Maven distributions, not SHA-256 ones. 
With this change, users can pin the published value.
   
   Closes #310 (MWRAPPER-145 in the old Jira). Replaces #398, which was closed 
as stale. Related to #316.
   
   ## What changes
   
   - The Java wrapper and the four scripts (`mvnw`, `mvnw.cmd`, `only-mvnw`, 
`only-mvnw.cmd`) check the new sums.
   - `mvn wrapper:wrapper` accepts `-DdistributionSha512Sum` and 
`-DwrapperSha512Sum`.
   - The SHA-256 properties still work and their code is not touched. SHA-256 
is not deprecated. If both sums of a file are set, both are checked.
   - Unit tests, integration tests and docs are included.
   - The new plugin parameters and the docs say 3.3.5. Tell me if it should be 
another version.
   
   ## Differences from #398
   
   - The review comments on #398 are applied: the wording of the messages, and 
no NPE in `Installer` when the new field is not set.
   - `mvnw` and `only-mvnw` compute the sum and compare it, instead of calling 
`sha512sum -c`. On macOS, `-c` accepts a malformed sum unless `--strict` is 
set, and BusyBox (Alpine) does not know `--strict`.
   - The Windows jobs failed on that code because PowerShell wraps the error 
message, so the test did not find it (seen in the CI log of #485, which carries 
the same commit). The tests now ignore whitespace when they look for the 
message.
   - Two new tests check that a correct sum is accepted.
   - No version change.
   
   ## Tests
   
   `mvn -Prun-its verify` passes on macOS (JDK 25) and on Linux (JDK 8 in a 
container, without the mvnd test). I could not run Windows locally.
   
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [ ] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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