2

我想通过 STS 将 commons-fileupload 和 commons-io 库添加到我的项目中。当我尝试在我的 pom.xml 添加依赖项并对其进行更新时,我一直收到以下所有版本的错误

Maven dependency problem
    ArtifactDescriptorException: Failed to read artifact descriptor for commons-fileupload:commons-fileupload:jar:1.1: 
    ArtifactResolutionException: Failure to transfer commons-fileupload:commons-fileupload:pom:1.1 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. 

    Original error: Could not transfer artifact commons-fileupload:commons-fileupload:pom:1.1 from/to central (http://repo1.maven.org/maven2): Connect times out

我试图从 mvn 中查找:

http://mvnrepository.com/artifact/commons-io/commons-io/2.4
http://mvnrepository.com/artifact/commons-fileupload/commons-fileupload/1.2.2

我对其他库没有问题,尤其是公共日志记录。
我正在为我的 Spring 项目使用SpringSource Tool Suite Version: 2.9.2.RELEASE

4

1 回答 1

8

首先删除您的本地存储库(可能只是 commons-io 等文件夹),然后仅检查以下 URL 下的 Maven Central:

http://search.maven.org/

在哪里可以找到所需的依赖项:

<dependency>
    <groupId>commons-fileupload</groupId>
    <artifactId>commons-fileupload</artifactId>
    <version>1.2.2</version>
</dependency>

<dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.4</version>
</dependency>
于 2012-07-23T07:49:16.560 回答