Configure maven environment under Mac

1. Switch to the user directory

 

cd ~

 

2. Open .bash_profile if there is no touch to create one

 

vim .bash_profile;

  

  Add to

  

export M2_HOME=/Users/grande/Documents/Developer/server/apache-maven-3.3.9
export PATH=$PATH:$M2_HOME/bin

 

3. Execute the source to take effect

 

4.mvn -v verification

 

  The effect is as shown in the figure:

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326248742&siteId=291194637