Install Maven

2019-10-18  本文已影响0人  yuhan_sining

1、下载maven最新版本
#Download maven latest distribution tar from apache maven site
https://maven.apache.org/download.cgi

2、解压tar包
tar -xvf apache-­maven-<Version>-­bin.tar.gz

3、增加环境变量
vim /etc/profile
增加:
export M2_HOME=/usr/local/apache-maven-3.6.1
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

4、刷新环境变量
source /etc/profile

5、查验maven版本号
#Now to test your install of Maven, enter the following command
mvn -version

上一篇 下一篇

猜你喜欢

热点阅读