1.创建文件夹D:\m2\repository
2.修改E:\apache-maven-3.5.4\conf\setting.xml文件。将
改成<localRepository></localRepository>中路径修改成希望保存的路径
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository
-->
<localRepository>D:\m2\repository</localRepository>
注意:修改路径,要把注释打开
3.将setting.xml文件复制到m2文件夹里