cd /opt2.解压maven安装包
tar -zxf apache-maven-3.6.2-bin.tar.gz3.移动maven到soft/maven362下
mv apache-maven-3.6.2 soft/maven3624.配置maven环境变量
vim /etc/profile
#Maven export MAVEN_HOME=/opt/soft/maven362 export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
source /etc/profile5.查看maven版本
mvn -version6.maven362下创建jarstore
mkdir -p /opt/soft/maven362/jarstore7.修改maven的setting.xml
vim /opt/soft/maven362/conf/settings.xml
修改内容如下:
/opt/soft/maven362/jarstore
alimaven central aliyun maven https://maven.aliyun.com/repository/central alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ central aliyunmaven * 阿里云spring插件仓库 https://maven.aliyun.com/repository/spring-plugin repo2 Mirror from Maven Repo2 https://repo.spring.io/plugins-release/ central



