0

我认为 Gradle 构建问题与这篇关于 Spring Artifactory 实例 repo.spring.io 权限的 Spring文章有关。请帮助我纠正升级到 Gradle 5.0 后最近开始失败的 build.gradle。

来自 build.gradle 的片段

buildscript {
    ext {
        springBootVersion = SPRING_BOOT_VERSION
    }
    repositories {
        mavenCentral()
        maven {
            url 'https://repo.spring.io/libs-milestone'
        }
    
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath('se.transmode.gradle:gradle-docker:1.2')
    }
}
apply plugin: 'java'
repositories {
    mavenCentral()
    maven {
        url 'https://repo.spring.io/libs-milestone'
    }
    maven { url "https://packages.atlassian.com/maven/repository/public" }
}

dependencies {
    compile (group: 'com.atlassian.renderer', name: 'atlassian-renderer', version:'8.0.5') {
        exclude(module: 'servlet-api')
        exclude(module: 'radeox')
        // https://mvnrepository.com/artifact/javax.activation/activation
        compile group: 'javax.activation', name: 'activation', version: '1.1.1'

    }
}


我得到的错误是

      > Could not resolve com.atlassian.renderer:atlassian-renderer:8.0.5.
         > Could not get resource 'https://repo.spring.io/libs-milestone/com/atlassian/renderer/atlassian-renderer/8.0.5/atlassian-renderer-8.0.5.pom'.
            > Could not HEAD 'https://repo.spring.io/libs-milestone/com/atlassian/renderer/atlassian-renderer/8.0.5/atlassian-renderer-8.0.5.pom'. Received status code 401 from server: Unauthorized

请帮忙。

4

1 回答 1

0

我在 build.gradle 的存储库中添加了 jCenter,它对我有用。

    jcenter()

我认为 maven repo 不再提供 atlassian-renderer。

于 2021-02-25T11:33:52.907 回答