Programmer light 2022-02-13 07:58:54 阅读数:368
Maven – Download Apache Mavenhttps://maven.apache.org/download.cgi
decompression :tar -zxvf apache-maven-3.8.3-bin.tar.gz
mv apache-maven-3.8.3-bin /root/maven
vi /etc/profile
Finally add
export MAVEN_HOME=/root/maven
export PATH=$MAVEN_HOME/bin:$PATH
source /etc/profile
mvn -v
cd /root/maven/conf
vi settings.xml
Find the label mirror, Annotate the original image , Change to Alibaba cloud image . Note that the indentation
<!--
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
<blocked>true</blocked>
</mirror>
-->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
perform mvn clean install, success
copyright:author[Programmer light],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130758532488.html