Maven dependencies are failing with a 501 error

前端 未结 25 3236
南旧
南旧 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

    Originally from https://stackoverflow.com/a/59796324/32453 though this might be useful:

    Beware that your parent pom can (re) define repositories as well, and if it has overridden central and specified http for whatever reason, you'll need to fix that (so places to fix: ~/.m2/settings.xml AND also parent poms).

    If you can't fix it in parent pom, you can override parent pom's repo's, like this, in your child pom (extracted from the 3.6.3 default super pom, seems they changed the name from repo1 as well):

      
        
          central
          Central Repository
          https://repo.maven.apache.org/maven2 
          default
          
            false 
          
        
      
    

提交回复
热议问题