我在我的项目上尝试了maven的干净安装,每次我得到下面的错误
Maven版本2.2.1 JDK 1.7
F:\Wealth>"C:\Program Files\apache-maven-2.2.1\bin\mvn.bat" cl
ean install -U
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building polo
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
Downloading: http://maven.apps.com/maven2/org/apache/maven/plugins/maven-cle
an-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository nunki (http://maven.apps.com/maven2): Error transferring file: Connection timed out: connect
Downloading: http://maven.apps.com/maven/org.apache.maven.plugins/poms/maven
-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository nunki-legacy (http://maven.apps.com/maven): Error transferring file: Connection timed out: connect
Downloading: http://maven.apps.com/maven2//org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection timed out: connect
Downloading: http://maven.apps.com/maven2/org/apache/maven/plugins/maven-cle
an-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository nunki (http://maven.apps.com/maven2): Error transferring file: Connection timed out: connect
Downloading: http://maven.apps.com/maven/org.apache.maven.plugins/poms/maven
-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository nunki-legacy (http://maven.apps.com/maven): Error transferring file: Connection timed out: connect
Downloading: http://maven.apps.com/maven2//org/apache/maven/plugins/maven-cl
ean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection timed out: connect
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-clean-plugin
Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in repository: Unable to download the artifact from any repository
org.apache.maven.plugins:maven-clean-plugin:pom:2.2
from the specified remote repositories:
nunki-legacy (http://maven.apps.com/maven),
central (http://maven.apps.com/maven2/),
nunki (http://maven.apps.com/maven2)
for project org.apache.maven.plugins:maven-clean-plugin
我检查了settings.xml中的代理设置,我的感觉是这就是问题所在。但是我已经尝试了相同的代理设置来构建其他开源软件项目,并且构建是成功的。但是对于这个项目,我看到了这个错误。
有人能就这个问题给出一个想法吗?
发布于 2015-05-08 04:45:26
DependencyResolutionException
(来源:)
当Maven无法下载依赖项时,通常会出现此错误。导致此错误的可能原因是:
<repository>的声明。${user.home}/.m2/settings.xml包含一个<server>声明,其<id>与要使用的远程存储库的<id>相匹配。远程仓库使用SSL,运行Maven的JVM不信任server.LocalRepositoryNotAccessibleException。Maven3中的-U。如果出现与网络相关的一般问题,您还可以参考以下文章:
发布于 2015-02-26 01:15:48
您的远程存储库都有域maven.apps.com,这是您的intranet中的域吗?Nexus是否作为Maven central的镜像运行?
如果没有,您可以尝试临时删除settings.xml,并查看默认设置是否成功。
发布于 2016-10-19 05:11:09
我遇到了这个问题,maven不能下载任何东西。经过一些谷歌搜索和一些运气,我删除了~/.m2/server.xml文件。这就解决了这个问题。我以前没碰过那个文件,不确定是什么问题。
https://stackoverflow.com/questions/28725195
复制相似问题