我在网上研究了一些spring的例子。我举了一个例子
http://code.google.com/p/spring-finance-manager/
在我的eclipse中导入项目时,我在POM.xml文件中遇到错误。
Multiple annotations found at this line:
- Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from http://repo.maven.apache.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 org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): null to http://
repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom
- connection timed out
- Failure to transfer org.apache.maven.plugins:maven-source-plugin:pom:2.0.4 from http://repo.maven.apache.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 org.apache.maven.plugins:maven-source-plugin:pom:2.0.4 from/to central (http://repo.maven.apache.org/maven2): connection timed out to
http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-source-plugin/2.0.4/maven-source-plugin-2.0.4.pom我还试着删除了我的.m2\repository文件夹。但是仍然得到了错误。
有人能指导我解决这个问题吗?
发布于 2015-01-08 00:18:15
是的,我自己也经历过这个问题。以下是其他一些观察结果:
无法从中心(http://repo.maven.apache.org/maven2)向中心(http://repo.maven.apache.org/maven2)传输项目org.apache.maven.plugins:maven-resources-plugin:pom:2.6 :连接超时
我也想知道这到底是什么意思:到底什么是转移,从哪里转移到哪里?我相信我们最初在工作空间中有.pom文件,并且基于pom,必要的工件将被下载到我们本地的maven存储库中。在我们的IDE构建路径中进一步引用了这些存储库。
为什么对某些工件会“超时”,而对其他工件就不会?此外,这些内容似乎指向“org.eclipse.m2.core”。更准确地说,org.eclipse.m2.core和代理的组合正在搞砸它--作为开发人员,我们无法控制它。这非常令人沮丧。
我们不知道的东西可能会严重伤害我们--例如-- (eclipse +代理)动态。
发布于 2015-01-08 08:40:10
经过大量的谷歌搜索后,我找到了解决方案:除了在settings.xml中添加代理信息之外,我还必须添加以下内容来解决这个问题。同样,只有当涉及到代理时,这才是一个问题。这是下一次与eclipse相关的神秘堆栈跟踪呕吐之前的平静--我猜。
<activeProfiles>
<activeProfile>securecentral</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>securecentral</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>发布于 2014-05-06 17:21:02
请求http://repo.maven.apache.org/maven2存储库时出现超时异常。http://repo.maven.apache.org/maven2不能正常工作的时间。也可能出现其他网络问题,如主机dns、网络中断集线器、网络代理设置等。
https://stackoverflow.com/questions/23490556
复制相似问题