maven 安装与配置仓库(yum 方式)- IT书 - itbook.com

原创链接:https://itbook.com/article/1584784431282

安装

下载并安装mvn

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

配置仓库

编辑配置文件

vim /etc/maven/settings.xml

国内服务器推荐配置阿里仓库:

<mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
</mirror>

国外服务器推荐配置默认仓库:

<mirror>
      <id>central-https</id>
      <url>https://repo.maven.apache.org/maven2</url>
      <mirrorOf>central</mirrorOf>
</mirror>

猜你喜欢

转载自www.cnblogs.com/itbook-com/p/12540667.html