繁体   English   中英

从源代码构建 Spring Security 时出错

[英]Got an error when building spring security from source

我需要为我的实验从源头构建 spring 安全性。 我按照 github github 中的指南运行了$./gradlew install命令: spring-security 但是,它返回以下错误:

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

原因是什么? 如何解决?

问题出在 Gradle 错误中:

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

该项目正在尝试使用https://repo.spring.io/libs-snapshot解决依赖项,该依赖项因401 HTTP 状态而被拒绝。

由于 Spring 基础架构团队最近实施的限制,它可能会失败。 详情请参阅博文: https : //spring.io/blog/2020/10/29/notice-of-permissions-changes-to-repo-spring-io-fall-and-winter-2020

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM