Eclipse修改maven本地倉庫,Local Repository還是原來的默認倉庫
Window->Preferences->maven->User Settings
Global Settings:
點擊Browse選擇自己的maven->conf->settings.xml文件
..\apache-maven-3.6.2-bin\apache-maven-3.6.2\conf\settings.xml
問題:
發現自己的Local Repositiory仍然未自動選擇自己的maven本地倉庫
解決:
1、修改settings.xml文件
..\apache-maven-3.6.2-bin\apache-maven-3.6.2\conf\settings.xml
2、指定本地倉庫的地址
將下面的代碼添加到settings.xml文件中
<localRepository>..\Maven\mavenrep</localRepository>
注:
指本地的maven倉庫地址
3、修改之后重新打開
Window->Preferences->maven->User Settings
Global Settings:
點擊Browse選擇自己的maven->conf->settings.xml文件
..\apache-maven-3.6.2-bin\apache-maven-3.6.2\conf\settings.xml
發現Local Repository已經是本地倉庫地址
問題解決!