centos 上yum安装Maven
-
yum安装
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo sudo yum install -y apache-maven
-
安装完毕,查看安装位置
mvn -version
-
添加阿里云的镜像地址
vi /usr/share/apache-maven/conf/settings.xml
-
修改下面节点
<mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
-
配置仓库位置
<localRepository>/cicro/var/m2/repo</localRepository>