Léon

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

仓库知识参考 http://www.cnblogs.com/luotaoyeah/p/3785044.html

 

1. 修改配置文件settings.xml

  假设你的maven位置在 D:\apache-maven-3.3.9 ,打开配置文件 D:\apache-maven-3.3.9\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>D:\repository</localRepository>

  其中,D:\repository 即为本地仓库位置,当然你可以改为其他位置。

2. 修改Eclipse中的配置

  打开 Eclipse -> Prefrences -> Maven -> User Settings -> 

  

  修改User Settings中的路径为你的settins.xml的位置,如D:\apache-maven-3.3.9\conf\settings.xml 。如果此时发现下面的Local Repository并非你在settings.xml中设置的,请检查下settings.xml是否搞对了。

  点一下Update Settings和Reindex,确定就可以了。

posted on 2016-05-06 15:11  Léon  阅读(5161)  评论(0编辑  收藏  举报