Maven安装教程

安装包下载:http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3

                    或者

                    http://maven.apache.org/download.cgi

选在自己需要安装的版本;

【安装步骤】

1、下载解压到指定目录:D:install

2、环境变量配置:

       a、变量:M2_HOME,变量值:D:installapache-maven-3.5.3

 b、变量:Path,变量值:%M2_HOME%in

检查安装配置是否成功

打开CMD窗口,显示如下信息即安装配置成功。

3、修改本地仓库位置

    文件位置:D:installapache-maven-3.5.3confsettings.xml

在<settings></settings>标签对中加入以下内容

<localRepository>D:install
epo</localRepository>

4、配置阿里云的中央仓库

    文件位置:D:installapache-maven-3.5.3confsettings.xml

在上述文件中的  <mirrors></mirrors>标签对中加入以下内容

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

5、修改IDE的maven配置(Myeclispe为例)

    菜单栏 Windows —> Preferences —> Maven —> User Settings 

原文地址:https://www.cnblogs.com/qingmuchuanqi48/p/12056215.html