Maven dependencies are failing with a 501 error

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

    I have the same issue, but I use GitLab instead of Jenkins. The steps I had to do to get over the issue:

    1. My project is in GitLab so it uses the .yml file which points to a Docker image I have to do continuous integration, and the image it uses has the http://maven URLs. So I changed that to https://maven.
    2. That same Dockerfile image had an older version of Maven 3.0.1 that gave me issues just overnight. I updated the Dockerfile to get the latest version 3.6.3
    3. I then deployed that image to my online repository, and updated my Maven project ymlfile to use that new image.
    4. And lastly, I updated my main projects POM file to reference https://maven... instead of http://maven

    I realize that is more specific to my setup. But without doing all of the steps above I would still continue to get this error message Return code is: 501 , ReasonPhrase:HTTPS Required

提交回复
热议问题