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:\install\apache-maven-3.5.3


b、变量:Path,变量值:%M2_HOME%\bin


检查安装配置是否成功

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


3、修改本地仓库位置

    文件位置:D:\install\apache-maven-3.5.3\conf\settings.xml

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

<localRepository>D:\install\repo</localRepository>

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

    文件位置:D:\install\apache-maven-3.5.3\conf\settings.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 


如果您觉得文档对您有帮助,希望您能支持一下:http://cup.dnsxo.com

猜你喜欢

转载自blog.csdn.net/sunshine52013/article/details/80298315