从源代码构建Spring Security时出错 [英] Got an error when building spring security from source

查看:112
本文介绍了从源代码构建Spring Security时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从源头上构建Spring Security,以进行实验.我在github github上按照其指南运行了 $./gradlew install 命令:春季安全性.但是,它返回以下错误:

I need to build spring security from source for my experiments. I ran the command $./gradlew install folloing its guide in githubgithub: spring-security. However, it returns the following errors:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':spring-security-config:compileKotlin'.
> Could not resolve all files for configuration ':spring-security-config:kotlinCompilerClasspath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.10.
     Required by:
         project :spring-security-config
      > Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.10.
         > Could not get resource 'https://repo.spring.io/libs-snapshot/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.4.10/kotlin-compiler-embeddable-1.4.10.pom'.
            > Could not HEAD 'https://repo.spring.io/libs-snapshot/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.4.10/kotlin-compiler-embeddable-1.4.10.pom'. Received status code 401 from server: Unauthorized
   > Could not resolve org.jetbrains.kotlin:kotlin-bom:1.4.10.
     Required by:
         project :spring-security-config
      > Could not resolve org.jetbrains.kotlin:kotlin-bom:1.4.10.
         > Could not get resource 'https://repo.spring.io/libs-snapshot/org/jetbrains/kotlin/kotlin-bom/1.4.10/kotlin-bom-1.4.10.pom'.
            > Could not GET 'https://repo.spring.io/libs-snapshot/org/jetbrains/kotlin/kotlin-bom/1.4.10/kotlin-bom-1.4.10.pom'. Received status code 401 from server: Unauthorized

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3m 53s

是什么原因?如何解决?

What is the cause? How to fix it?

推荐答案

Gradle错误中存在该问题:

The issue is there in Gradle error:

从服务器收到状态码401:未经授权

Received status code 401 from server: Unauthorized

该项目正尝试使用 https://repo.spring.io/libs-snapshot解决依赖关系并以 401 HTTP状态被拒绝.

The project is trying to resolve dependencies using https://repo.spring.io/libs-snapshot which being rejected with a 401 HTTP status.

由于Spring基础架构团队最近实施了限制,因此它很可能失败.有关更多详细信息,请参见博客文章:

It is likely failing because of the recent restrictions put in place by the Spring infrastructure team. See the blog post for more details: https://spring.io/blog/2020/10/29/notice-of-permissions-changes-to-repo-spring-io-fall-and-winter-2020

一个潜在的解决方案是修改项目的存储库,以便使用Maven Central或JCenter之类的公共存储库.有关更多详细信息,请参见Gradle的文档.

A potential solution is modifying the project's repositories so that public repositories such as Maven Central or JCenter are used. See Gradle's documentation for more details.

如果Spring Security构建需要仅在现在的私有Spring存储库中可用的工件,则无法保证是否会奏效.

There is no guarantees if this will work if the Spring Security build requires artifacts that are only available in now private Spring repositories.

这篇关于从源代码构建Spring Security时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆