Today, I have been stuck on downloading a jar package during the build. With the help of the development partners, I found a solution:
Modify the maven configuration file (/usr/local/apache-maven/conf/settings.xml) and add the following in the <mirrors></mirrors> tags:
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
Then rebuild it again.
The reason for this failure may be that maven uses foreign mirrors by default, and there is a problem of network delay or interception. It is good to change to domestic mirrors.