起因:
开发时,默认maven的本地库是在当前用户下,但随着maven不断从远程下载三方库jar文件到本地库,当前用户所在磁盘会不断消耗,同时面临系统重装导致的本地库数据丢失问题.
怎么办:
面对这样的痛苦,我们需要自主设置本地库的位置
解决办法:
修改maven的conf下的settings.xml文件,在settings下添加如下红色字样,具体位置自己设定
<settings>
<localRepository>E:/maven_repository/.m2/repository</localRepository>
<profiles>
<profile>
......
<localRepository>E:/maven_repository/.m2/repository</localRepository>
<profiles>
<profile>
......