用maven将项目安装到本地仓库,为什么老是在默认仓库地址(C:UsersuserName.m2 epository)

使用mvn clean install安装项目到本地的时候,在idea中配置好了本地仓库地址,见下图:

但是安装时,还是安装到了C:UsersuserName.m2 epository路径下,经查,原来在maven的conf目录下的配置文件settings.xml中,没有配置localRepository,将localRepository配置成和上图一样的地址,在此安装成功。配置截图见下图:

原文地址:https://www.cnblogs.com/feiyujun/p/10474060.html