1.安装brew
如果报错,Warning: /opt/homebrew/bin is not in your PATH.
vim ~/.zshrc,最后一行追加
export PATH=“/opt/homebrew/binPATH”
source ~/.zshrc
2.安装brew install maven
mvn -version查看路径
Maven home: /opt/homebrew/Cellar/maven/3.9.9/libexec
修改设置vi /opt/homebrew/Cellar/maven/3.9.9/libexec/conf/settings.xml