代码编织梦想

最近升级Maven到3.8.1后,mvn编译的时候总是提示拉不到依赖,报错:

Could not validate integrity of download from http://0.0.0.0/…

关键字maven-default-http-blocker。

原因

如果使用HTTP协议下载依赖,可能会导致中间人攻击。比如,本来想下载一个nacos-client的,结果下载的结果中被插入了恶意代码,然后开发人员运行了一下,黑客就能获得开发人员的计算机控制权了。

所以Maven 3.8.1就禁止了所有HTTP协议的Maven仓库。

详情见Maven 3.8.1的发布日志

日常开发中,我们经常会用到公司内部的maven仓库。这些仓库一般都是http协议,Maven 3.8.1禁止了http协议,那么就会导致开头的报错。

解决方案

在~/.m2/setttings.xml中添加同名mirror,然后指定这个mirror不对任何仓库生效即可。

<mirror>
    <id>maven-default-http-blocker</id>
    <mirrorOf>!*</mirrorOf>
    <url>http://0.0.0.0/</url>
</mirror>
非经本人同意,禁止任何形式转载
本文链接:https://blog.csdn.net/qq_33589510/article/details/129628792

Could not transfer artifact e-iceblue:spire.pdf:pom:3.11.6 from/to maven-default-http-blocker-爱代码爱编程

报错信息: Could not transfer artifact e-iceblue:spire.pdf:pom:3.11.6 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [com.e-iceblue (http://rep

maven-default-http-blocker-爱代码爱编程

最近有个同事在使用新版maven 3.8.3构建时遇到了一个问题,具体报错信息如下: Could not transfer artifact com.google.code:kaptcha:pom:2.3.2 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for 

Could not transfer artifact XXXX from/to maven-default-http-blocker (http://0.0.0.0/)-爱代码爱编程

多模块项目,打包时,报的错误信息: Could not transfer artifact XXXX from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [alimaven (http://maven.aliyun.com/nexus/

Could not transfer artifact xxx from/to maven-default-http-blocker (http://0.0.0.0/)-爱代码爱编程

maven构建项目的时候遇到了Could not transfer artifact xxxxxx:pom:1.1-SNAPSHOT from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [nexus-118 (http://xxxxxx

Downloading from maven-default-http-blocker的解决办法-爱代码爱编程

前言 配置了一个私有仓库地址,下载依赖的时候有警告,依赖下载不下来,仔细看地址有问题,编程0.0.0.0了: Downloading from maven-default-http-blocker: http://0.0.0.0/com/jeremytsai/jeremy-basic-common/1.0.0/maven-metadata.xml [W

maven升级3.8.1后maven-default-http-blocker (http0.0.0.0) blocked mirror for repositories_xiaoweiwei99的博客-爱代码爱编程

Maven升级3.8.1后Blocked mirror for repositories 问题分析解决思路 思路一: 降低Maven 版本到3.8.1 以下思路二:增加节点思路三:将镜像仓库从http 变

依赖更新报错could not transfer artifact xxx from/to maven-default-http-blocker (http://0.0.0.0/)_alan_刘志强的博客-爱代码爱编程

依赖更新报错Could not transfer artifact xxx from/to maven-default-http-blocker (http://0.0.0.0/) 背景 拿到新的项目源码,依赖包下载不成

springboot导入父依赖报错:non-resolvable parent pom for...failed to transfer from http://0.0.0.0/...-爱代码爱编程

文章目录 一、情景复现二、BUG提示三、原因分析及解决方法 一、情景复现 二、BUG提示 Non-resolvable parent POM for com.tt:myproject:0.0.1-SNA

maven编译failed to transfer from http://0.0.0.0/ during a previous attempt.-爱代码爱编程

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: com.sitech.cmap:platform-top:pom:3.2.5-SNAPSHOT failed to transfer from http://0.0.0.0/ during a previous att

idea自带maven报错maven-爱代码爱编程

问题描述 使用IDEA版本IntelliJ IDEA 2021.3 maven版本:3.8.1 更新依赖的时候错误提示: maven-default-http-blocker (http://0.0.0.0/): B

解决 idea 下载源码失败的问题maven-爱代码爱编程

title: 解决 IDEA 下载源码失败的问题maven-default-http-blocker (http://0.0.0.0/) Blocked mirror for repositories date: 202