Mac配置使用 IDEA默认的maven步骤
- 配置环境变量
MAVEN_HOME=/Applications/IntelliJ\ IDEA.app/Contents/plugins/maven/lib/maven3
export MAVEN_HOME
PATH=
P
A
T
H
:
PATH:
P
A
T
H
:
MAVEN_HOME/bin
export PATH
- 对 mvn 添加执行权限
chmod a+x /Applications/IntelliJ\ IDEA.app/Contents/plugins/maven/lib/maven3/bin/mvn
- 验证
fresherdeMacBook-Pro:target fresher$ mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3
Java version: 1.8.0_144, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.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”