eclipse修改maven仓库的位置
1.先移动你的maven仓库位置,就是把c盘下的.m2文件夹复制一份移动到你想移动的位置
原位置:C:\Users\恒信科技.m2 要移动的位置:E:.m2\repository
2.修改在maven的setting.xml文件
找到并在后面加 <localRepository>E:\.m2\repository</localRepository>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- 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>E:\.m2\repository</localRepository>
注意:千万不要在注释里面加
3.打开eclipse-preference-Maven-UserSetting
修改后就会自动修改本地仓库了
还没有评论,来说两句吧...