赞
踩
Tips:Maven 版本最好不要超过 3.8.0,最新版 Maven 会不兼容一些配置信息。上面的 Maven 地址里可以选择自己想下载的版本(这个地址不好找,建议收藏)
Tips:这里有一个坑,一定要选择 binaries,否则选择了 source 会发现很多配置路径不一样
- # 解压
- tar -zxvf apache-maven-3.6.3-bin.tar.gz
-
- # 配置环境变量
- vi ~/.bash_profile
-
- export MAVEN_HOME=/Users/{uname}/Downloads/apache-maven-3.6.3
- export PATH=$PATH:$MAVEN_HOME/bin
-
- # 生效配置
- source ~/.bash_profile
-
- # 验证
- mvn -v
-
- Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
- Maven home: /Users/eudoracheng/Downloads/apache-maven-3.6.3
- Java version: 1.8.0_372, vendor: Tencent, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_372.jdk/Contents/Home/jre
- Default locale: zh_CN, platform encoding: UTF-8
- OS name: "mac os x", version: "12.6.2", arch: "x86_64", family: "mac"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。