下载地址:
https://maven.apache.org/download.cgi
环境变量配置
vi ~/.bash_profile
JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home"
CLASS_HOME="$JAVA_HOME/lib"
MAVEN_HOME="/Users/apple/myApplication/apache-maven-3.8.3"
PATH=".;$PATH:$JAVA_HOME/bin:/usr/local/bin:/usr/local/Cellar/python@3.8/3.8.2/bin:$MAVEN_HOME/bin"
source ~/.bash_profile
检查
(base) ➜ myApplication mvn -v
Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
Maven home: /Users/apple/myApplication/apache-maven-3.8.3
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"