• Maven’s official website:Maven.apache.org/download.cg…

  • Download the file to /usr/local/and decompress it
wget https:/ / mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
Copy the code

  • Configuring environment Variables
vim /etc/profile 
Copy the code
export MAVEN_HOME=/usr/local/apache-maven-3.63.   
export PATH=$MAVEN_HOME/bin:$PATH
Copy the code
source /etc/profile
Copy the code
  • Check the version of Maven
mvn -v
Copy the code

  • Configure MAVEN accelerated image. The MAVEN image source of Ali Cloud is configured here.
  • edit/ usr/local/apache maven - 3.6.3 / conf/Settings. The XML
  • in<mirrors></mirrors>Add the following to the tag pair:
Aliyunmaven </id> <mirrorOf>*</mirrorOf> <name> <url>https://maven.aliyun.com/repository/public</url> </mirror>Copy the code