eclipse修改maven仓库位置的方法实现

2022-11-13 14:11:41 修改 位置 仓库

1.先移动你的Maven仓库位置,就是把c盘下的.m2文件夹复制一份移动到你想移动的位置

原位置:C:Users恒信科技.m2 要移动的位置:E:.m2 epository

2.修改在maven的setting.xml文件

找到并在后面加 <localRepository>E:.m2 epository</localRepository>

<settings xmlns="Http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <!-- 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>E:.m2
epository</localRepository>

注意:千万不要在注释里面加

3.打开eclipse-preference-Maven-UserSetting

在这里插入图片描述

修改后就会自动修改本地仓库了

到此这篇关于eclipse修改maven仓库位置的方法实现的文章就介绍到这了,更多相关eclipse修改maven仓库位置内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!

相关文章