解决Maven提示:Could not read settings.xml, assuming default values

本文转载自:http://blog.csdn.net/hqocshheqing/article/details/47702049

最近在学习Maven  时总是出现 Could not read settings.xml, assuming default values  错误,使得用户配置无法生效,在网上找了很多资料仍然解决不了,后来通过自己摸索找到了一下原因:

①:在  settings  配置文件中一定不能有中文,包括注释  <!--   -->  内部也不能有。

②:路径一定要写对:比如说  <localRepository>D:/Maven/repo/</localRepository>  中的路径使用 “/”  而非  windows 路径中的  “”。

③:不管用什么编辑器,在保存的时候一定要保存为   “UTF-8”,推荐使用   notePad++  :

希望能够帮助大家。

原文地址:https://www.cnblogs.com/wpcnblog/p/6396924.html