First, download maven
Website address: http://maven.apache.org/
Go to the official web to download the latest maven.
Then unzip it to the installation directory, where I extract it directly to D, as shown in the directory structure of the MAVEN installation package.
Second, install Maven
Configure MAVEN Environment variables
Right-click the My Computer or My Computer icon and select Properties in the Bounce list
Click on the "Advanced system settings" on the left in the Bouncing system panel and go to the System Properties panel.
Click the "Environment variable (N) ..." in the lower-right corner of the System Properties panel to pop up an environment variable panel, as shown in the following illustration.
Click the "New ..." button under "System Variables", enter the variable name maven_home in the new system variable, and set the variable value to the installation path, here for the D:\apache-maven-3.3.9
In system variables, select Path variable and add%maven_home%\bin at the end of its variable value (note: The preceding variable values are separated by semicolons).
When the settings are complete, click the OK button until all the panels are closed.
test MAVEN Environment Variables
Press shortcut key Win+r on Windows, bring up "run" window, enter CMD in the Run window, click "OK" button, as shown in the following figure.
Enter MVN-V in the command Line window, if the MAVEN basic information is displayed, as shown in the following illustration, the MAVEN environment variable is built successfully. If "not internal or external commands or executable programs" is displayed, the environment variable configuration fails.
Enter the path command at the command line, and in the path that appears, see if the path you just configured is the correct path, and if not, modify the environment path you just set up. You can see from the image below that my environment path is set correctly.