Eclipse导入maven插件安装-win10-64位系统

一、下载官方maven-3.5.4程序包:

        下载地址:http://maven.apache.org/download.cgi

        单击apache-maven-3.5.4-bin.zip这个压缩包下载

二、解压缩maven程序包:

        建议解压缩并重命名至D:\maven-3.5.4

        建议建立资源文件夹:D:\repository

三、修改maven配置文件中的资源文件夹地址:

        用文本软件打开D:\maven-3.5.4\conf文件夹下的settings.xml

        在

  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->

        下添加如下内容

<localRepository>D:\repository</localRepository>

四、Ecplise程序中配置maven:

        ①菜单栏-Window-Preferences-Maven-Installations-Add-Directory-本地maven文件夹(D:\maven-3.5.4)-Finish-选择maven-3.5.4

        ②(可略)菜单栏-Window-Preferences-Maven-User Settings-Global Settings-Browse-本地maven配置文件地址(D:\maven-3.5.4\conf\settings.xml)

        ③菜单栏-Window-Preferences-Maven-User Settings-User Settings-Browse-本地maven配置文件地址(D:\maven-3.5.4\conf\settings.xml)

        ④菜单栏-Window-Preferences-Maven-User Settings-Update Settings

        此时Local Respository变成步骤三配置的地址,如果没有可以进行下一步刷新一下

        ⑤菜单栏-Window-Preferences-Maven-User Settings-Reindex

        Apply and Close。

--------------------------------------------完成。

猜你喜欢

转载自blog.csdn.net/u012725623/article/details/80879050