Installation Maven-3.8.6 on CentOS 7.9

一、Installation Maven-3.8.6 on CentOS 7.9

1 地址

2 wget 下载

wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz

3 解压

tar -zxvf apache-maven-3.8.6-bin.tar.gz -C /opt/

4 修改名字

cd /opt/apache-maven-3.8.6
mv apache-maven-3.8.6 maven-3.8.6

5 配置环境变量

vim /etc/profile
export PATH=$PATH:/opt/maven-3.8.6/bin
# 使配置文件生效
source /etc/profile

6 配置 vim /opt/maven-3.8.6/conf/settings.xml

<!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  
<mirrors>
    <mirror>
          <id>alimaven</id>
          <name>aliyun maven</name>
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
          <mirrorOf>central</mirrorOf>        
    </mirror>
</mirrors>

 

 

posted @ 2022-10-08 01:17  娇小赤雅  阅读(427)  评论(0编辑  收藏  举报