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>
相关推荐
苏supper2 分钟前
记一次Nacos鉴权报错unknown user,403排查|SecurityProxy源码,fastjson2扩展包缺失
java·后端
\光辉岁月/4 分钟前
6.mybatisplus学习-BaseMapper、Service、常用注解
java·mybatis·mybatisplus
微信开发api5 分钟前
基于WTAPI构建社群运营平台:自动拉群与会话承接链路设计
java·大数据·网络·数据库·微信·自动化
小七在进步11 分钟前
类和对象(五)
java·开发语言·算法
驭渊的小故事36 分钟前
SpringBoot 配置文件详解:properties 与 yml 从入门到实战
java·开发语言·笔记
Wx-bishekaifayuan38 分钟前
Springcloud中学在线学习平台58883-计算机课程设计、毕业设计
java·vue.js·spring boot·学习·spring·spring cloud·课程设计
一嘴一个橘子43 分钟前
java 中使用 lua 脚本
java
码智社1 小时前
Spring Framework 全方位技术解析
java
wangqiaowq1 小时前
AST 安全求值
java·开发语言
Java_2017_csdn2 小时前
OFC、ERP、OMS、WMS、TMS 对比-详解
java