一、创建本地maven

1、去官网上下载最新的maven,然后解压到安装目录中;

2、环境变量设置 m2_home;

创建本地maven及在eclipse更改为本地maven

3、在环境变量path中加入%MAVEN_HOME%\bin,要用英文分号与前面的环境变量进行分隔;

4、保存后,在控制台打入mvn -v,如果能看到如下信息,证明环境变量配置成功;

创建本地maven及在eclipse更改为本地maven

5、修改本地仓库位置,打开conf文件夹下的settinns.xml,在settings标签下添加多一个<localRepository></localRepository>,位置为新的本地仓库地址;

创建本地maven及在eclipse更改为本地maven

创建本地maven及在eclipse更改为本地maven

二、在eclipse中修改为本地maven

1、进入Preferences -> Maven -> Installations,添加本地安装位置,打勾并保存;

创建本地maven及在eclipse更改为本地maven

2、修改settings.xml文件位置;

创建本地maven及在eclipse更改为本地maven



相关文章:

  • 2021-08-26
  • 2021-06-08
  • 2021-08-09
  • 2021-07-05
  • 2022-01-15
  • 2021-09-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2021-09-26
  • 2021-05-25
  • 2021-07-01
  • 2021-05-27
相关资源
相似解决方案