download

Maven.apache.org/download.cg… Download apache maven – 3.6.3 – bin. Zip

The installation

Decompress to a directory such as /usr/local/apache-maven-3.6.3

Configuring environment Variables

1. Terminal execution

vim ~/.bash_profile
Copy the code

2. Press I to enter the editing model and add

Export MAVEN_HOME = / usr/local/apache maven - 3.6.3 export PATH = $PATH: $MAVEN_HOME/binCopy the code

3. Press ESC to exit the editing model, save and exit

:wq
Copy the code

4. Enter the following command on the terminal for bash_profile to take effect

source ~/.bash_profile
Copy the code

5. Verify whether it is successful

mvn -v
Copy the code

Apache Maven 3.6.3 succeeds if you can see the version number