Maven computer each time you restart mvn -v show command is not

The system according to which steps installed maven

Proceed as follows: the Mac the installation and configuration Maven

But it is strange, every time you close and then open the terminal to perform mvn -v to die, you need to install again,

Later tried many methods, found in vim ~ / .bash_profile are even equipped with two environment variables mvn

 

 

MAVEN_HOME=/Users/shangri-la/Sites/apache-maven-3.5.0  //maven解压目录
PATH=$MAVEN_HOME/bin:$PATH

M2_HOME=/Users/yinfuqing/Desktop/software/apache-maven-3.6.3

PATH=$PATH:$M2_HOME/bin

 

The problem lies here, maven_home maven is the first generation of writing, the future is M2_home le,

Delete the first part: retain only the second part:

M2_HOME=/Users/yinfuqing/Desktop/software/apache-maven-3.6.3

PATH=$PATH:$M2_HOME/bin

Then perform just fine

 

 

Each restart all this ,,

Guess you like

Origin www.cnblogs.com/aspirant/p/12160711.html