mvn command not found,表示配置变量出问题了,mac下IDEA可以做出如下改动
vim ~/.bash_profile
增加java和mvn路径
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
export JAVA_HOME
IDEA_MAVEN=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3
export IDEA_MAVEN
export PATH=${PATH}:${JAVA_HOME}/bin:${IDEA_MAVEN}/bin
source ~/.bash_profile
如果配mvn配置可执行权限
sudo chmod +x /Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/mvn
查看mvn版本号
mvn -v
来源:https://blog.csdn.net/liushuaitong/article/details/103729340