0
点赞
收藏
分享

微信扫一扫

玩客云 线刷Armbian 搭配Alist 阿里云盘 Jellyfin NovaVideoPlayer搞电视墙

精进的医生 2023-09-09 阅读 53
mavenjava

当 Maven 升级到3.8.1 之后,执行maven就会出现如下报错信息:

maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories

原因:
maven在3.8.1 的默认配置文件中增加了一组标签,如果仓库镜像是 http 而不是https 就会被拦截禁止访问,而当前公司私服一般是http 而不支持https。

解决方法:

方法一:

降低Maven 版本到3.8.1 以下

方法二:

将镜像仓库从http 变成https

方法三:

增加节点

<mirror>  
<id>insecure-repo</id>
<mirrorOf>external:http:*</mirrorOf>
<url>http://www.ebi.ac.uk/intact/maven/nexus/content/repositories/ebi-repo/</url>
<blocked>false</blocked>
</mirror>

方法四:

注释掉 $MAVEN_HOME/conf/settings.xml 中的拦截标签

找到你IDEA中指定的settings.xml配置文件,注释掉如下配置即可:

<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
<blocked>true</blocked>
</mirror>

每天努力一点,每天都在进步

举报
0 条评论