【发布时间】:2016-12-25 08:54:10
【问题描述】:
我尝试使用 Spring,但我的 pom.xml 中似乎有些问题,无法解析 spring 依赖项。
在 pom.xml 我有以下存储库:
<repositories>
<repository>
<id>repository.springframework.maven.release</id>
<name>Spring Framework Maven Release Repository</name>
<url>http://maven.springframework.org/release</url>
</repository>
</repositories>
<!-- Spring Core framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.2.RELEASE</version>
</dependency>
<!-- Spring security framework -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>4.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>4.1.2.RELEASE</version>
</dependency>
我总是:无法解析项目的依赖关系,无法解析以下工件:
org.springframework.security:spring-security-web:jar:4.1.2.RELEASE
aopalliance:aopalliance:jar:1.0
org.springframework.security:spring-security-core:jar:4.1.2.RELEASE
org.springframework:spring-expression:jar:4.3.1.RELEASE
org.springframework.security:spring-security-config:jar:4.1.2.RELEASE
即使我在 pom.xml 中使用另一个存储库,甚至删除存储库以使用 maven 中的默认存储库,它还是一样,没有任何改变。
来自 Maven 的完整错误消息:
Failed to execute goal on project Aegyptologie: Could not resolve dependencies for project de.unileipzig.wirote:Aegyptologie:war:0.1-SNAPSHOT: The following artifacts could not be resolved: org.springframework:spring-core:jar:4.3.2.RELEASE, org.springframework:spring-web:jar:4.3.2.RELEASE, org.springframework:spring-aop:jar:4.3.2.RELEASE, org.springframework:spring-beans:jar:4.3.2.RELEASE, org.springframework:spring-context:jar:4.3.2.RELEASE, org.springframework.security:spring-security-web:jar:4.1.2.RELEASE, aopalliance:aopalliance:jar:1.0, org.springframework.security:spring-security-core:jar:4.1.2.RELEASE, org.springframework:spring-expression:jar:4.3.1.RELEASE, org.springframework.security:spring-security-config:jar:4.1.2.RELEASE: Could not transfer artifact org.springframework:spring-core:jar:4.3.2.RELEASE from/to repository.springframework.maven.release (http://maven.springframework.org/release): Connection reset -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
我该如何解决?
【问题讨论】:
-
你在代理后面吗?
-
能否提供来自 Maven 的完整错误消息?
-
@A_Di-Matteo 不,我不使用任何代理
-
@Daniel 我编辑我的问题。请参阅已编辑问题中的整个错误
-
你有什么理由不从 maven Central 获取 Spring 框架吗?我从来没有用过
http://maven.springframework.org/release...
标签: spring maven spring-security