Maven dependencies are failing with a 501 error

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

    The reason for the observed error is explained in Central 501 HTTPS Required

    Effective January 15, 2020, The Central Repository no longer supports insecure communication over plain HTTP and requires that all requests to the repository are encrypted over HTTPS.

    It looks like latest versions of Maven (tried with 3.6.0, 3.6.1) are already using the HTTPS URL by default.

    Here are the dates when the major repositories will switch:

    Your Java builds might break starting January 13th (if you haven't yet switched repo access to HTTPS)

    Update: Seems like from maven 3.2.3 maven central is accessed via HTTPS See https://stackoverflow.com/a/25411658/5820670

    Maven Change log (http://maven.apache.org/docs/3.2.3/release-notes.html)

提交回复
热议问题