CentOS7 安装Maven 3.6

 

  • 下载安装

 

# http://maven.apache.org/download.cgi
wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.2/binaries/apache-maven-3.6.2-bin.tar.gz
tar xvf apache-maven-3.6.2-bin.tar.gz -C /usr/local/
#配置环境变量
vim /etc/profile
export MAVEN_HOME=/usr/local/apache-maven-3.6.2
export PATH=$PATH:$MAVEN_HOME/bin
source /etc/profile
#测试
mvn -version

 

  • 设置阿里云Maven仓库地址

 

#mirrors 及诶点下添加mirror子节点
vim /usr/local/apache-maven-3.6.2/conf/settings.xml
    
     alimaven 
     aliyun maven 
 http://maven.aliyun.com/nexus/content/groups/public/ 
     central 
     

#https://yq.aliyun.com/articles/659803
#或者project节点新增如下

        
        
            nexus-aliyun  
         Nexus aliyun  
 http://maven.aliyun.com/nexus/content/groups/public
        

 

你可能感兴趣的:(运维组件)