MacBook Linux 装置 Maven
官网下载地址: https://maven.apache.org/down…
官网下载对应的版本 bin.tar.gz 包
#解压
tar -zxvf xxx.tar.gz
#减少环境变量 MacBook 我用的是 zsh,Linux 的配置文件 /etc/profile
vim ~/.zshrc
#最初退出
export MVN_HOME=/Users/liang/software/apache-maven-3.2.5
export PATH=$MVN_HOME/bin:$PATH
#使配置失效
source ~/.zshrc
#查看 maven 版本
mvn -version
#显示如下
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-15T01:29:23+08:00)
Maven home: /Users/liang/software/apache-maven-3.2.5
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"