在gradle构建atlassian渲染器库期间获取401未授权

kiayqfof  于 2021-07-13  发布在  Java
关注(0)|答案(1)|浏览(479)

我认为gradle的构建问题与这篇关于spring artifactory示例repo.spring.io权限的spring文章有关。请帮助我纠正我的build.gradle最近升级到gradle 5.0后开始失败。
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

请帮忙。

ijxebb2r

ijxebb2r1#

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

jcenter()

我认为atlassian渲染器不再适用于maven repo。

相关问题