本文共 1125 字,大约阅读时间需要 3 分钟。
[root@localhost 桌面]# mkdir /usr/maven[root@localhost 桌面]# cp /mnt/hgfs/share/apache-maven-3.5.3-bin.tar.gz /usr/maven/maven3.5.3-bin-tar.gz
[root@localhost 桌面]# cd /usr/maven/[root@localhost maven]# lsmaven3.5.3-bin-tar.gz[root@localhost maven]# tar -zxvf maven3.5.3-bin-tar.gz
vi /etc/profile
# set maven environmentexport MAVEN_HOME=/usr/maven/apache-maven-3.5.3export PATH=${PATH}:${MAVEN_HOME}/bin
source /etc/profile
mvn -v
在maven目录下,conf/settings.xml,在<mirrors></mirros>里添加
nexus-aliyun * Nexus aliyun http://maven.aliyun.com/nexus/content/groups/public
nexus-osc * Nexusosc http://maven.oschina.net/content/groups/public/
转载地址:http://ofzeo.baihongyu.com/