Maven dependencies are failing with a 501 error

前端 未结 25 3568
南旧
南旧 2020-11-22 06:28

Recently Maven build jobs running in Jenkins are failing with the below exception saying that they couldn\'t pull dependencies from Maven Central

25条回答
  •  迷失自我
    2020-11-22 07:25

    This error occured to me too. I did what Muhammad umer said above. But, it only solved error for spring-boot-dependencies and spring-boot-dependencies has child dependencies. Now, there were 21 errors. Previously, it was 2 errors. Like this:

    Non-resolvable import POM: Could not transfer artifact org.springframework.cloud:spring-cloud-dependencies:pom:Hoxton.SR3 from/to central
    

    and also https required in the error message.

    I updated the maven version from 3.2.2 to 3.6.3 and java version from 8 to 11. Now, all errors of https required are gone.

    To update maven version

    1. Download latest maven from here: download maven
    2. Unzip and move it to /opt/maven/
    3. Set the path export PATH=$PATH:/opt/maven/bin
    4. And, also remove old maven from PATH

提交回复
热议问题