0
点赞
收藏
分享

微信扫一扫

eclipse修改maven仓库的位置

彭维盛 2022-03-20 阅读 33
java

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
在这里插入图片描述
修改后就会自动修改本地仓库了

举报

相关推荐

0 条评论