-
Notifications
You must be signed in to change notification settings - Fork 201
chore(build): Upgrade Maven Wrapper script to 3.3.4 and managed Maven version to 3.9.12 #797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… version to 3.9.12 Signed-off-by: Radoslav Husar <[email protected]>
Reviewer's GuideUpdates the Maven wrapper to v3.3.4 with an "only-script" setup that no longer checks in the wrapper JAR, replaces both mvnw and mvnw.cmd with the new upstream scripts, bumps the managed Maven distribution to 3.9.12, and deletes the legacy Java-based wrapper downloader. Sequence diagram for the updated Maven wrapper execution flowsequenceDiagram
actor Developer
participant mvnw as mvnw_script
participant Props as maven_wrapper_properties
participant Repo as RemoteMavenRepo
participant Cache as MavenDistributionCache
participant Maven as MavenExecutable
Developer->>mvnw: run mvnw [goals]
mvnw->>Props: read distributionUrl, distributionSha256Sum
mvnw->>Cache: check existing MAVEN_HOME for distributionUrl
alt distribution present
mvnw->>Maven: exec $MAVEN_HOME/bin/mvn [goals]
Maven-->>Developer: build output
else distribution missing
mvnw->>Repo: download Maven distribution (zip/tar.gz)
mvnw->>mvnw: optionally validate SHA-256
mvnw->>Cache: extract distribution under ~/.m2/wrapper/dists
mvnw->>Maven: exec new $MAVEN_HOME/bin/mvn [goals]
Maven-->>Developer: build output
end
Flow diagram for Maven wrapper bootstrap without checked-in JARflowchart TD
A[Developer runs mvnw or mvnw.cmd] --> B[Read .mvn/wrapper/maven-wrapper.properties]
B --> C{Existing MAVEN_HOME for distributionUrl?}
C -->|Yes| D[Resolve MAVEN_HOME in ~/.m2/wrapper/dists]
D --> E[Invoke MAVEN_HOME/bin/mvn or mvnd]
E --> F[Execute build]
C -->|No| G[Create temp download directory]
G --> H[Download Maven distribution from distributionUrl
using wget/curl/Java or WebClient]
H --> I{distributionSha256Sum defined?}
I -->|Yes| J[Validate SHA-256 checksum]
J -->|OK| K[Extract archive into temp directory]
J -->|Failed| X[Abort: checksum validation failed]
I -->|No| K[Extract archive into temp directory]
K --> L[Locate extracted distribution directory]
L --> M[Move directory under ~/.m2/wrapper/dists as MAVEN_HOME]
M --> E
X --> Y[Exit with error]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly removed the binary from SCM that I detest.
Summary by Sourcery
Upgrade the Maven Wrapper to the latest script-based implementation and update the managed Maven distribution version.
Build: