1、下载maven
在下面的地址里找最新版的maven下载
https://dlcdn.apache.org/maven/maven-3/
2、解压
tar -xzvf apache-maven-3.8.5-bin.tar.gz
#移动在其他目录中,我习惯在/opt中
sudo mv apache-maven-3.8.5 /opt
3、配置源
在maven的目录config的setting.xml中添加下面源
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*,!jeecg,!jeecg-snapshots</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
在idea中配置本地的maven
我一般只配置上面两个,下面的仓库位置就使用默认的就行。
参考
https://blog.csdn.net/Silly011/article/details/122179552
https://blog.csdn.net/rj2012001/article/details/121871992
https://blog.csdn.net/huwei2003/article/details/41822841