通过brew安装Maven后,在IntelliJ中获取无效的Maven主目录

mrb*_*ela 12 intellij-idea maven

我想在 IntelliJ 中设置本地brew安装的 Maven(不使用捆绑的),但总是收到“无效的 Maven 主目录”提示。

Maven 安装在这里:

me@MBP ~ % brew list maven
/opt/homebrew/Cellar/maven/3.8.4/bin/mvn
/opt/homebrew/Cellar/maven/3.8.4/bin/mvnDebug
/opt/homebrew/Cellar/maven/3.8.4/bin/mvnyjp
/opt/homebrew/Cellar/maven/3.8.4/libexec/bin/ (4 files)
/opt/homebrew/Cellar/maven/3.8.4/libexec/boot/ (2 files)
/opt/homebrew/Cellar/maven/3.8.4/libexec/conf/ (3 files)
/opt/homebrew/Cellar/maven/3.8.4/libexec/lib/ (62 files)
Run Code Online (Sandbox Code Playgroud)

当我尝试将此路径设置为 IntelliJ 时,我得到:

Maven 主目录无效

我究竟做错了什么?

编辑

我尝试过类似的路径,但似乎没有任何效果:

无效的 Maven 主目录 2

无效的 Maven 主目录 3

Vil*_*ili 14

如果您不使用...按钮浏览Maven home path而是复制此路径

英特尔Mac:

/usr/local/opt/maven/libexec
Run Code Online (Sandbox Code Playgroud)

硅胶麦克:

/opt/homebrew/opt/maven/libexec
Run Code Online (Sandbox Code Playgroud)

进入输入字段,然后brew update不会破坏 Maven 访问。


kar*_*thi 10

尝试使用 libexec 文件夹...

/opt/homebrew/Cellar/maven/3.8.4/libexec

在此输入图像描述