2

我想通过STS将commons-fileupload和commons-io库添加到我的项目中。 当我试图在我的pom.xml依赖增加和更新,我一直在下面无误地接收所有版本公用文件上传和公用文件上传的maven依赖项

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 

我没有问题与其他图书馆, 进出口使用SpringSource工具套件特别版共享记录:2.9.2.RELEASE我的春天项目

感谢所有的答复

+1

似乎你有一个连接问题('连接超时')。请在浏览器中尝试以下网址:http://repo1.maven.org/maven2/commons-io/commons-io/2.4/ – 2012-07-23 07:35:43

+0

同时从您的本地存储库中删除相关文件夹,以便maven重试。 – Raghuram 2012-07-23 07:42:46

回答

8

首先删除您的本地存储库(可能只有公地IO etc文件夹)还只检查Maven的中央下面的网址下:

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> 
+0

我使用Maven,当我将1.3作为commons-fileupload的版本时,maven自动为commons-io解析2.2版。我想知道为什么它不能解决2.4版本的问题。 – 2013-05-28 00:00:54

+0

可能在父pom中定义了dependencyManagement块吗? – khmarbaise 2013-05-28 06:41:05

相关问题