安装maven
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo yum -y install apache-maven
查看maven home
mvn -v
配置环境变量
vi /etc/profile
重载环境变量
source /etc/profile
替换maven源,阿里云的源
vim /etc/maven/settings.xml
找到<mirrors></mirrors>标签对,添加一下代码:
<mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
指定下载资源位置
<localRepository>/usr/local/maven/repository</localRepository>
指定JDK版本
<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>
标签:repos,1.8,maven,etc,yum,linux,apache From: https://www.cnblogs.com/void--main/p/17774811.html