标签:local profile groups htm epo class conf target html
安装maven必须要有java环境,如果没有安装java环境,请按照博文安装java环境!
官网:http://maven.apache.org/download.cgi
$ wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
$ tar zxf apache-maven-3.6.3-bin.tar.gz -C /usr/local/
$ cd /usr/local/apache-maven-3.6.3/bin
$ echo PATH=$PATH:$PWD >> /etc/profile
$ source /etc/profile
$ mvn -v
$ vim /usr/local/apache-maven-3.6.3/conf/settings.xml
# 添加以下内容
<localRepository>/usr/local/apache-maven-3.6.3/repo</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> # 必须写到这个字段里面,要不不生效
标签:local profile groups htm epo class conf target html
原文地址:https://www.cnblogs.com/lvzhenjiang/p/14385240.html