下载地址
http://maven.apache.org/download.cgi
或直接命令行下载
wget http://103.78.124.74:81/2Q2WD13E0283E2526C90F8F399C312C7E8F607427505_unknown_4A87FEAE5E7E687ACBD546F6C331BA5769507069_8/mirror.bit.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
安装
sudo tar -zxvf apache-maven-3.6.3-bin.tar.gz -C /opt/app
sudo vim /etc/profile
## maven配置
export M2_HOME=/opt/app/apache-maven-3.6.3
export PATH=${M2_HOME}/bin:$PATH
source /etc/profile
mvn -v
sudo tar -zxvf apache-maven-3.6.3-bin.tar.gz -C /opt/eclipse_java/app
export M2_HOME=/opt/eclipse_java/app/apache-maven-3.6.3
export PATH=${M2_HOME}/bin:$PATH
精简配置-阿里镜像
settings_springboot_simple.xml
<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>/opt/wks/jar/springboot</localRepository> <mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> <profiles> <profile> <id>JDK-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile> </profiles> </settings>