Mac 下配置maven环境

1.切换到用户目录

cd ~

2.打开.bash_profile 如果没有 touch创建一个

 

vim .bash_profile;

  

  添加

  

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

 

3.执行source生效

4.mvn -v 验证

  效果如图:

 

 

猜你喜欢

转载自onekeyes.iteye.com/blog/2370663