我嘗試使用Spring,但在我的pom.xml中似乎存在一些問題,無法解決Spring依賴關係。項目在本地沒有解決的Maven中存在依賴關係(Spring-security依賴關係)
在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的完整錯誤消息? – Daniel
@ A_Di-Matteo不,我不使用任何代理 –