只需修改Maven配置文件即可
在Maven安装目录下的/conf/settings.xml 中找到
<!-- 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>/path/to/local/repo</localRepository>即为本地仓库地址,将路径修改成本地仓库所在路径即可