ubuntu环境搭建专栏点击跳转
本篇文章对应之前写的Ubuntu系统环境搭建(五)——Ubuntu安装maven,是对这篇文章的纠正和补充,这一篇是最新版的搭建手册,请以这一篇为准!
sudo apt update
sudo apt install maven
mvn -v
用下列setting文件替换
/usr/share/maven/conf
下的settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
<pluginGroups>
pluginGroups>
<proxies>
proxies>
<servers>
servers>
<mirrors>
<mirror>
<id>aliyunid>
<mirrorOf>*mirrorOf>
<name>aliyunname>
<url>https://maven.aliyun.com/repository/publicurl>
mirror>
mirrors>
<profiles>
profiles>
settings>