spring security依赖的maven构建错误
我的 Spring Boot 项目出现 Maven 构建错误 我在 pom.xml 中添加了 Spring Security,但完整的 Maven 构建
依赖项:
<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-web -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>5.5.0-M1</version>
</dependency>
错误:
[WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to
SpringFramework (https://maven.springframework.org/milestone/): Authorization failed for
https://maven.springframework.org/milestone/net/minidev/json-smart/maven-metadata.xml 403
Forbidden
[WARNING] The POM for org.springframework.security:spring-security-web:jar:5.5.0-M1 is
missing, no dependency information available
[WARNING] The POM for org.springframework.security:spring-security-config:jar:5.5.0-M1 is
missing, no dependency information available
[WARNING] The POM for org.springframework.security:spring-security-core:jar:5.5.0-M1 is
missing, no dependency information available
[ERROR] Failed to execute goal on project gtt-v2-sample-track-salesorders-service: Could not
resolve dependencies for project com.sap.gtt.v2:gtt-v2-sample-track-salesorders-
service:jar:1.0.0: The following artifacts could not be resolved:
org.springframework.security:spring-security-web:jar:5.5.0-M1,
org.springframework.security:spring-security-config:jar:5.5.0-M1,
org.springframework.security:spring-security-core:jar:5.5.0-M1: Failure to find
org.springframework.security:spring-security-web:jar:5.5.0-M1 in
https://maven.springframework.org/milestone/ was cached in the local repository, resolution
will not be reattempted until the update interval of SpringFramework has elapsed or updates are forced -> [Help 1]
我需要更改任何内容吗?如何解决问题
i am getting maven build error for my spring boot project i added spring security in my pom.xml but complete maven build
Dependency:
<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-web -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>5.5.0-M1</version>
</dependency>
Error:
[WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to
SpringFramework (https://maven.springframework.org/milestone/): Authorization failed for
https://maven.springframework.org/milestone/net/minidev/json-smart/maven-metadata.xml 403
Forbidden
[WARNING] The POM for org.springframework.security:spring-security-web:jar:5.5.0-M1 is
missing, no dependency information available
[WARNING] The POM for org.springframework.security:spring-security-config:jar:5.5.0-M1 is
missing, no dependency information available
[WARNING] The POM for org.springframework.security:spring-security-core:jar:5.5.0-M1 is
missing, no dependency information available
[ERROR] Failed to execute goal on project gtt-v2-sample-track-salesorders-service: Could not
resolve dependencies for project com.sap.gtt.v2:gtt-v2-sample-track-salesorders-
service:jar:1.0.0: The following artifacts could not be resolved:
org.springframework.security:spring-security-web:jar:5.5.0-M1,
org.springframework.security:spring-security-config:jar:5.5.0-M1,
org.springframework.security:spring-security-core:jar:5.5.0-M1: Failure to find
org.springframework.security:spring-security-web:jar:5.5.0-M1 in
https://maven.springframework.org/milestone/ was cached in the local repository, resolution
will not be reattempted until the update interval of SpringFramework has elapsed or updates are forced -> [Help 1]
do i need to change anything, how to resolve issue
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 spring boot 的版本更改
为此
change the version of the spring boot
to this
5.5.0 和 5.5.1 版本存在一些漏洞。
请参阅此处的详细信息:
https://mvnrepository.com/artifact/org。 springframework.security/spring-security-web/5.5.1
请在代码中使用建议的版本 5.6.2(没有这些漏洞)。
更改版本,然后运行 mvn -U clean install 更新 spring 依赖版本。如果您使用代理,请确保在 settings.xml 中添加代理详细信息,如此处所述
There are some vulnerabilities for version 5.5.0 and 5.5.1.
See the details here:
https://mvnrepository.com/artifact/org.springframework.security/spring-security-web/5.5.1
Please use the suggested version 5.6.2 (which doesn't have those vulnerabilities) in your code.
Change the version and then run mvn -U clean install to update the spring dependency version. If you are behind a proxy, ensure that you have the proxy details added in your settings.xml as mentioned here