centos版本yum工具
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
settings.xml修改
whereis maven
vim settings.xml
#本地仓库位置
<localRepository>/xxx/xxx/repository</localRepository>
#mirrors节点下 配置阿里源
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
网友评论