maven阻止HTTP协议的仓库访问

发现报错

failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer artifact com.... from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: maven.repository (http://.../, default, releases+snapshots)

原因

Maven 3.8.1+ 默认阻止 HTTP 仓库

从 Maven 3.8.1 开始,默认禁用了不安全的 HTTP 仓库

解决

复制代码
<settings>
  <!-- 允许 HTTP 的非加密连接 -->
  <mirrors>
    <!-- 移除或注释掉 maven-default-http-blocker -->
  </mirrors>
  
  <profiles>
    <profile>
      <id>allow-http</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>your-repo</id>
          <url>http://.......</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>
相关推荐
lemon_sjdk20 分钟前
javafx-Image图像(2)
java·javafx
小七在进步37 分钟前
C++入门(2)
java·jvm·c++
To0R41 分钟前
Agent 上线前必须过的五道门(附 Spring Boot 实现)
java
vipxieliang1 小时前
固定电话验证详解:区号、号码、分机号的完整验证
java·spring boot
步行cgn1 小时前
Spring Boot 主入口类上的 @Enable 和 @Scan 注解详解
java·spring boot·后端
lhldsg1 小时前
全民健身解决方案软件开发实战:从架构设计到部署指南
java·前端·数据库·小程序
两点王爷1 小时前
Java 与前端加载 MVT 数据:从服务端切片到浏览器渲染
java·前端·状态模式
TinyMemory1 小时前
Java 面向对象核心入门(九):方法重写 Override|彻底分清重载与重写
java·面向对象·override·方法重写·重载与重写
LaughingZhu1 小时前
Product Hunt 每日热榜 | 2026-09-08
java·ide·深度学习·百度·intellij-idea
IT枫斗者枫哥2 小时前
Java 文件导出:写完了,为什么还不能标记成功?
java