idea中maven无法下载私服 有公司名字的jar包全部爆红原理
当我们在项目中依赖一个jar包时,Maven程序会先去本地仓库中找,如果没找到就回去私服找,如果还是没有,最后就回去中央仓库找。其过程如下图:
查看项目 .m2 文件夹中的settings.xml,pom.xml文件,是否进行了私服的配置
在本地settings.xml中添加镜像
4 配置host------------------------注意这里---------------------- F:/repository ------------------------注意这里-----------------到 .m2 文件夹中的 settings.xml 文件中找以下内容releases 用户名 密码 snapshots 用户名 密码 ------------------------注意这里-----------------到 .m2 文件夹中的 settings.xml 文件中找以下内容 aliyun central aliyun https://maven.aliyun.com/repository/central/ repo1 central Human Readable Name for this Mirror. http://repo1.maven.org/maven2/ repo2 central Human Readable Name for this Mirror. http://repo2.maven.org/maven2/



