linux安装maven及配置
1、安装wget命令
yum -y install wget
2、下载maven安装包
wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
3.解压maven安装包
tar -zxvf apache-maven-3.5.4-bin.tar.gz
4.配置maven
vi /etc/profile
在配置文件配置
export MAVEN_HOME=/opt/apache-maven-3.5.4
export PATH=$MAVEN_HOME/bin:$PATH
配置文件生效
source /etc/profile
5.查看maven
mvn -version
编辑配置文件:vi maven/conf/setting.xml
阿里镜像
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>