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

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

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

posted @ 2019-03-04 23:16  飞鱼君  阅读(7234)  评论(0编辑  收藏  举报