1.创建文件夹D:m2 epository
2.修改E:apache-maven-3.5.4confsetting.xml文件。将
改成<localRepository></localRepository>中路径修改成希望保存的路径
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository
-->
<localRepository>D:m2
epository</localRepository>
注意:修改路径,要把注释打开
3.将setting.xml文件复制到m2文件夹里
4.eclipse中,window--->preferences-->maven--installations添加新安装的maven
5.eclipse中,window--->preferences-->maven-->user setting
Browes 找到文件 D:m2settings.xml.,点击OK就可以啦