Cannot access repo.spring.io for Spring-boot exercises

后端 未结 4 804
清歌不尽
清歌不尽 2021-01-05 03:58

I\'m looking at spring-boot at the moment, but cannot access the repo.spring.io maven repository in builds.

I\'ve created the initial Gradle build file , but receive

相关标签:
4条回答
  • 2021-01-05 04:13

    repo.spring.io lazily caches the contents of Maven Central. You don't say which dependency it is that's causing a problem, but I believe the problem that you're seeing is that you're attempting to access an artifact that has yet to be cached. This will result in a 401 response.

    Trying adding mavenCentral() to the configured repositories in build.gradle. For example:

    repositories {
        mavenCentral()
        maven { url "https://repo.spring.io/milestone" }
    }
    
    0 讨论(0)
  • 2021-01-05 04:14

    repo.spring.io is no longer serving through plain http. Check your gradle (pom.xml, etc) file for http://repo.spring.io and change it to https://repo.spring.io

    The relevant maven error message is similar to this:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.8.2:site (default-site) on project tidy-up: SiteToolException: The site descriptor cannot be resolved from the repository: ArtifactResolutionException: Unable to locate site descriptor: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:xml:site_en:2.2.4.RELEASE from/to springplugins (http://repo.spring.io/plugins-release/): Access denied to: http://repo.spring.io/plugins-release/org/springframework/boot/spring-boot-starter-parent/2.2.4.RELEASE/spring-boot-starter-parent-2.2.4.RELEASE-site_en.xml , ReasonPhrase:Forbidden.
    
    0 讨论(0)
  • 2021-01-05 04:14

    repo.spring.io is no longer serving through plain http.

    1- Check your pom.xml file for http://repo.spring.io/plugins-release/

    2- and change it to https://repo.spring.io/plugins-release/

    like below

    <repositories>
      <repository>
        <id>spring-repo</id>
        <url>https://repo.spring.io/plugins-release/</url>
      </repository>
    </repositories>
    
    0 讨论(0)
  • 2021-01-05 04:24

    This works for me when i was trying to do practice on spring boot.

    1. Go to .m2 Folder

    2. Create settings.xml

    3. Copy the code below

      CODE IN THE FIRST COMMENT

    0 讨论(0)
提交回复
热议问题