美文网首页
JENKINS中MAVEN编译报错failed to trans

JENKINS中MAVEN编译报错failed to trans

作者: 9016 | 来源:发表于2022-08-18 19:24 被阅读0次

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>
-->

相关文章

网友评论

      本文标题:JENKINS中MAVEN编译报错failed to trans

      本文链接:https://www.haomeiwen.com/subject/sjaegrtx.html