Maven dependencies are failing with a 501 error

前端 未结 25 3229
南旧
南旧 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:18

    Sharing this in case anyone needs it:

    Old Gradle config( without Gitlab , Docker deployments , for simple projects)

    repositories {
    google()
    jcenter()
    
    maven { url "http://dl.bintray.com/davideas/maven" }
    maven { url 'https://plugins.gradle.org/m2/' }
    maven { url 'http://repo1.maven.org/maven2' }
    maven { url 'http://jcenter.bintray.com' }
    }
    

    New config :

    repositories {
    google()
    jcenter()
    
    maven { url "https://dl.bintray.com/davideas/maven" }
    maven { url 'https://plugins.gradle.org/m2/' }
    maven { url 'https://repo1.maven.org/maven2' }
    maven { url 'https://jcenter.bintray.com' }
    }
    

    Notice the https. Happy coding :)

提交回复
热议问题