JENKINS中MAVEN编译报错failed to transfer from http://0.0.0.0/ during a previous attempt

Parsing POMs
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: org.springframework.boot:spring-boot-starter-parent:pom:2.2.4.RELEASE 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 org.springframework.boot:spring-boot-starter-parent:pom:2.2.4.RELEASE from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [intranet-nexus (http://127.0.0.1:8081/repository/maven-public/, default, releases)] @ line 20, column 25
[ERROR] Non-resolvable import POM: org.springframework.cloud:spring-cloud-dependencies:pom:Hoxton.SR9 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 org.springframework.cloud:spring-cloud-dependencies:pom:Hoxton.SR9 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [intranet-nexus (http://127.0.0.1:8081/repository/maven-public/, default, releases)] @ line 28, column 25
[ERROR] Non-resolvable import POM: com.alibaba.cloud:spring-cloud-alibaba-dependencies:pom:2.2.1.RELEASE 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.alibaba.cloud:spring-cloud-alibaba-dependencies:pom:2.2.1.RELEASE from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [intranet-nexus (http://127.0.0.1:8081/repository/maven-public/, default, releases)] @ line 36, column 25

MAVEN 3.8以后,如果仓库镜像是http 而不是https 就会被拦截禁止访问,而公司私服一般是http 而不支持https。
在conf/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>
-->
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,026评论 19 139
  • 英语好的可以看官方文档:Spring Cloud Config 中文版:Spring Cloud Config S...
    zero_93a5阅读 429评论 0 0
  • pom文件常见名词的意义 properties 定义父pom里出现的一些参数变量 dependencyManage...
    我也有键盘阅读 860评论 0 0
  • Zuul服务网关 学习目标 什么是 Zuul Zuul 是从设备和网站到应用程序后端的所有请求的前门。作为边缘服务...
    冰岛暖男的春天阅读 993评论 0 1
  • 1 二次开发现状分析 1.1 目前二次开发的痛点 过于依赖Ecology的JDK及Jar包,对于JDK及新版本工具...
    啊毛儿_8209阅读 2,723评论 0 0