-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bump new maven version 3.9.4 #2178
Conversation
WalkthroughThis pull request primarily focuses on upgrading the Apache Maven and Maven Wrapper versions, enhancing the startup scripts' reliability and flexibility, and improving compatibility across different operating systems. It also introduces checksum validation for the Maven Wrapper JAR file to ensure its integrity. Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 1
Files selected for processing (3)
- .mvn/wrapper/maven-wrapper.properties (1 hunks)
- mvnw (5 hunks)
- mvnw.cmd (6 hunks)
Files skipped from review due to trivial changes (1)
- .mvn/wrapper/maven-wrapper.properties
Additional comments (Suppressed): 11
mvnw.cmd (6)
21-31: The version of the Apache Maven Wrapper startup batch script has been updated from 2 to 3.2.0. Ensure that this change is compatible with the rest of your project.
196-197: The location of
mavenrc_pre.bat
,mavenrc_pre.cmd
,mavenrc_post.bat
, andmavenrc_post.cmd
files has been changed from%HOME%
to%USERPROFILE%
. Verify that these scripts are present in the new location and that they are correctly referenced throughout the codebase.38-40: A new line has been added to set the title of the command window to the name of the batch file (
%0
). This doesn't affect the functionality of the script but could improve user experience by making it easier to identify the command window when multiple windows are open.122-153: New functionality has been added to automatically download the
maven-wrapper.jar
file from Maven Central if it doesn't exist locally. This is a useful feature for projects that prohibit checking in binary data. However, ensure that the specified URL is correct and accessible, and that the downloaded file is placed in the correct directory.156-172: Another new feature validates the SHA-256 checksum of the downloaded
maven-wrapper.jar
file. This is a good security practice as it ensures the integrity of the downloaded file. However, make sure that the specified checksum inmaven-wrapper.properties
matches the actual checksum of themaven-wrapper.jar
file.174-185: The way CLI arguments are retrieved has been standardized across all platforms. This should improve the portability of the script. However, verify that this change doesn't break any existing functionality or cause issues on specific platforms.
mvnw (5)
22-32: The version of the Apache Maven Wrapper startup batch script has been updated from 2 to 3.2.0. Ensure that this change is compatible with the rest of your project and that all dependencies are still met.
53-108: The logic for determining the operating system and setting the
JAVA_HOME
environment variable has been significantly changed. The new hunk simplifies the process of finding the Java home directory on Darwin (macOS) systems and adds additional checks for theJAVA_HOME
environment variable on other systems. It also includes a workaround for a specific issue on Solaris 10/Sparc systems. Make sure these changes are compatible with your project's requirements and the environments it will be run in.118-124: The method for determining the
JAVACMD
variable has been slightly altered. Instead of usingwhich java
, the new hunk usescommand -v java
. This should have the same effect, but verify that this change does not cause any issues in your project.132-300: This new hunk introduces several new functions and features. The
find_maven_basedir
function traverses the directory structure from the process work directory to the filesystem root to find the project base directory. Theconcat_lines
function concatenates all lines of a file. A logging functionlog
is introduced which only logs messages ifMVNW_VERBOSE
is set to true.A significant addition is the mechanism for automatically downloading the
maven-wrapper.jar
from Maven Central if it doesn't exist locally, and validating its SHA-256 checksum. This is a useful feature for projects that prohibit checking in binary data, but make sure to verify the download URL and checksum for security reasons.The new hunk also changes how CLI arguments are retrieved to be more standardized across all platforms.
These changes improve the script's functionality and compatibility, but they should be thoroughly tested to ensure they work as expected in your project.
- 302-308: The command used to execute the Maven Wrapper has been slightly altered. The
-Dmaven.home=${M2_HOME}
argument has been removed, and theMAVEN_OPTS
andMAVEN_DEBUG_OPTS
variables have been added. Make sure these changes do not affect the execution of the Maven Wrapper in your project.
|
||
if [ -z "$MAVEN_SKIP_RC" ] ; then | ||
|
||
if [ -f /usr/local/etc/mavenrc ] ; then | ||
. /usr/local/etc/mavenrc | ||
fi | ||
|
||
if [ -f /etc/mavenrc ] ; then | ||
. /etc/mavenrc | ||
fi |
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.
The new hunk adds an additional check for a mavenrc
file in /usr/local/etc/mavenrc
. This allows for more flexibility in where the mavenrc
file can be located, but make sure that this location is appropriate for your project's setup.
Summary by CodeRabbit
mvnw
andmvnw.cmd
) for better compatibility across different operating systems, more reliable JAR file downloading from Maven Central, and added SHA-256 checksum validation for increased security.mavenrc_pre.bat
andmavenrc_pre.cmd
files to%USERPROFILE%
for easier access and management.