2012-12-13 61 views
1

以下是在解决依赖项的错误我春季安全3:春季安全3只依赖于我的POM如何定义春季安全3.0.3.RELEASE:ArtifactTransferException:故障转移

Multiple annotations found at this line: 
    - Missing artifact org.springframework.security:org.springframework.security.web:jar:3.0.3.RELEASE 
    - ArtifactTransferException: Failure to transfer 
    org.springframework.security:org.springframework.security.web:jar:3.0.3.RELEASE from http:// 
    repository.springsource.com/maven/bundles/release was cached in the local repository, resolution will not be 
    reattempted until the update interval of com.springsource.repository.bundles.release has elapsed or updates are 
    forced. Original error: Could not transfer artifact org.springframework.security:org.springframework.security.web:jar: 
    3.0.3.RELEASE from/to com.springsource.repository.bundles.release (http://repository.springsource.com/maven/ 
    bundles/release): connection timed out to http://repository.springsource.com/maven/bundles/release/org/ 
    springframework/security/org.springframework.security.web/3.0.3.RELEASE/ 
    org.springframework.security.web-3.0.3.RELEASE.jar 

以下是文件:

 <!-- Spring Security dependencies --> 
     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>org.springframework.security.acls</artifactId> 
      <version>${spring.security.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>org.springframework.security.config</artifactId> 
      <version>${spring.security.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>org.springframework.security.core</artifactId> 
      <version>${spring.security.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>org.springframework.security.taglibs</artifactId> 
      <version>${spring.security.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>org.springframework.security.web</artifactId> 
      <version>${spring.security.version}</version> 
     </dependency> 

以下是我已经在POM中定义的库:

<!-- SpringSource EBR repos --> 
    <repository> 
     <id>com.springsource.repository.bundles.release</id> 
     <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name> 
     <url>http://repository.springsource.com/maven/bundles/release</url> 
    </repository> 
    <repository> 
     <id>com.springsource.repository.bundles.external</id> 
     <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name> 
     <url>http://repository.springsource.com/maven/bundles/external</url> 
    </repository> 

有人可以帮助我理解为什么会出现此错误?

谢谢。

+0

对于其他人有这个问题,并在这里结束,[试试这个问题](http://stackoverflow.com/questions/5074063/maven-error-failure-to-transfer)。 – mawburn

回答

5

我测试的网址:

http://repository.springsource.com/maven/bundles/release/org/springframework/security/org.springframework.security.web/3.0.3.RELEASE/org.springframework.security.web-3.0.3.RELEASE.jar

,它的工作没有问题(我得到的文件)。

从本地m2存储库中删除(或重命名备份)文件夹org/springframework/security/org.springframework.security.web/3.0.3.RELEASE并再次尝试。

+0

是的,它现在工作正常。谢谢。 – skip