安装了 idea 后,maven 的路径

打开 访达 ,找到 idea , 右键

找到这个目录

/Applications/IntelliJ\ IDEA.app/Contents/plugins/maven/lib/maven3 

配置

第一步 打开用户环境变量配置

.bash_profile         // 为隐藏文件

macOS 访达 command + shift + .  打开隐藏文件显示或关闭。

或者

vim ~/.bash_profile

第二步 增加访问 maven 的环境配置

source ~/.bash_profile

载入环境变量。

第三步 

给 mvn 增加权限

  1. # 进入mvn目录

  2. cd /Applications/IntelliJ\ IDEA.app/Contents/plugins/maven/lib/maven3/bin

  3. # 添加权限,a-所有用户,x-执行权限

  4. chmod a+x mvn

第四步 

查看情况,打开终端

mvn -version

    mvn -version
    Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
    

    成功 !!!

    Logo

    一站式 AI 云服务平台

    更多推荐