homebrew安装maven

  • brew search maven
  • brew info maven
  • brew install maven

验证maven是否安装成功

mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.5", arch: "x86_64", family: "mac"

配置maven仓库
在路径/usr/local/Cellar/maven/3.5.0/libexec/conf下找到setting.xml,设置
<localRepository>/Users/xxx/maven_repo</localRepository>

    原文作者:perfect_jimmy
    原文地址: https://www.jianshu.com/p/02f17ab0fc74
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞