mac installation configuration maven

 

Download URL https://maven.apache.org/download.cgi

 

$ curl -O https://www-eu.apache.org/dist/maven/maven-3/3.6.2/binaries/apache-maven-3.6.2-bin.tar.gz
$ tar -xvf  apache-maven-3.6.2-bin.tar.gz
$ sudo mv -f apache-maven-3.6.2 /usr/local/

 

Edit  / etc / profile  file  the sudo Vim / etc / profile , add the following code at the end of the file:

export MAVEN_HOME=/usr/local/apache-maven-3.6.2
export PATH=${PATH}:${MAVEN_HOME}/bin

 

Save the file, and run the following command to make the environment variables to take effect:

# source /etc/profile

Enter the following command in the console console, if you can see related Maven version information, then the local Maven has been installed successfully:

# mvn -v

 

Open Intellij, click the top left corner down into the Preferences from the menu. Configuring maven address

Guess you like

Origin www.cnblogs.com/iwangzheng/p/11689893.html