Maven是Java中的一个项目构建工具。
1.下载Maven
Maven下载页面:https://maven.apache.org/download.cgi
1 | wget https://downloads.apache.org/maven/maven-3/3.8.2/binaries/apache-maven-3.8.2-bin.tar.gz |
2.解压
1 | tar -zxf apache-maven-3.8.2-bin.tar.gz -C /usr/local/ |
3.将bin添加到环境变量PATH中
1 | vim ~/.bash_profile |
添加如下内容:
1 | export PATH=/usr/local/apache-maven-3.8.2/bin:$PATH |
4.验证安装是否成功
1 | hgs-2:blog-backup hegongshan$ mvn --version |