maven配置好之后在cmd命令中执行mvn help:system的时候提示访问中央库失败具体错误如下:
C:\Users\liekkas>mvn help:system
[INFO] Scanning for projects…
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5:
Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
[警告]未能检索插件描述符org.apache.maven.plugins:maven-clean-plugin:2.5:
插件org.apache.maven.plugins:maven-clean-plugin:2.5或它的一个依赖项无法解决:
未能读org.apache.maven.plugins工件描述符:maven-clean-plugin:jar:2.5
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4:
Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
[警告]未能检索插件描述符org.apache.maven.plugins:maven-install-plugin:2.4:
插件org.apache.maven.plugins:maven-install-plugin:2.4或它的一个依赖项无法解决:
未能读org.apache.maven.plugins工件描述符:maven-install-plugin:jar:2.4
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
Downloading:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-。
deploy-plugin / 2.7 / maven-deploy-plugin-2.7.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7:
Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
[警告]未能检索插件描述符org.apache.maven.plugins:maven-deploy-plugin:2.7:
插件org.apache.maven.plugins:maven-deploy-plugin:2.7或它的一个依赖项无法解决:
未能读org.apache.maven.plugins工件描述符:maven-deploy-plugin:jar:2.7
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
site-plugin/3.3/maven-site-plugin-3.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3:
Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one
of its dependencies could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-site-plugin:jar:3.3
[警告]未能检索插件描述符org.apache.maven.plugins:maven-site-plugin:3.3:
或一个插件org.apache.maven.plugins:maven-site-plugin:3.3
的依赖关系无法解决:未能读工件描述符
org.apache.maven.plugins:maven-site-plugin:jar:3.3
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3:
Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
[警告]未能检索插件描述符org.apache.maven.plugins:maven-antrun-plugin:1.3:
插件org.apache.maven.plugins:maven-antrun-plugin:1.3或它的一个依赖项无法解决:
未能读org.apache.maven.plugins工件描述符:maven-antrun-plugin:jar:1.3
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:
Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
[警告]未能检索插件描述符org.apache.maven.plugins:maven-assembly-plugin:2.2 -beta-5:
插件org.apache.maven.plugins:maven-assembly-plugin:2.2 -beta-5或者它的一个依赖项无法解决:
未能读工件描述符org.apache.maven.plugins:maven-assembly-plugin:jar:2.2 -beta-5
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8:
Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
[警告]未能检索插件描述符org.apache.maven.plugins:maven-dependency-plugin:2.8:
插件org.apache.maven.plugins:maven-dependency-plugin:2.8或它的一个依赖项无法解决:
未能读org.apache.maven.plugins工件描述符:maven-dependency-plugin:jar:2.8
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
release-plugin/2.3.2/maven-release-plugin-2.3.2.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2:
Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies
could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-release-plugin:jar:2.3.2
[警告]未能检索插件描述符org.apache.maven.plugins:maven-release-plugin:2.3.2:
2.3.2插件org.apache.maven.plugins:maven-release-plugin:或者它的一个依赖项
无法解决:未能读工件描述符
2.3.2 org.apache.maven.plugins:maven-release-plugin:jar:
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central
(http://repo.maven.apache.org/maven2): repo.maven.apache.org
[警告]org.apache.maven.plugins / maven-metadata不能传输元数据。xml从/到中央
(http://repo.maven.apache.org/maven2):http://repo.maven.apache.org/maven2
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/
to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org
[警告]org.codehaus.mojo / maven-metadata不能传输元数据。xml的/
中央(http://repo.maven.apache.org/maven2):http://repo.maven.apache.org/maven2
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml 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 up
dates are forced. Original error: Could not transfer metadata
org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2):
repo.maven.apache.org
[警告]org.apache.maven.plugins / maven-metadata转移失败。xml从
http://repo.maven.apache.org/maven2缓存的本地存储库,决议
之前不会reattempted之后或中部的更新间隔
日期是被迫的。原始错误:无法传输元数据
org.apache.maven.plugins / maven-metadata。xml从/到中央(http://repo.maven.apache.org/maven2):
repo.maven.apache.org
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml 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 metadata org.codehaus.mojo/maven-metadata.xml from/to
central (http://repo.maven.apache.org/maven2): repo.maven.apache.org
[警告]org.codehaus.mojo / maven-metadata转移失败。xml从
http://repo.maven.apache.org/maven2缓存的本地存储库,决议
不是reattempted直到更新间隔中央强制运行或更新。
原始错误:无法转移org.codehaus.mojo / maven-metadata元数据。xml从/到
中央(http://repo.maven.apache.org/maven2):http://repo.maven.apache.org/maven2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.597 s
[INFO] Finished at: 2014-08-05T08:59:52+08:00
[INFO] Final Memory: 3M/85M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix ‘help’ in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (F:\Repositories\Maven), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
原因分析:看错误提示大概是说下载失败,那肯定就是网络的问题了。首先看你是移动还是网通的网络。需要设置代理。在maven的settings.xm文件里面的节点里面添加代理设置就可以了。我找到了四个可以使用的代理,废话不多少上代码:
1、
Central
http://repo1.maven.org/maven2
central
2、
ibiblio.org
ibiblio Mirror of http://repo1.maven.org/maven2/
http://mirrors.ibiblio.org/pub/mirrors/maven2
central
3、
jboss-public-repository-group
central
JBoss Public Repository Group
http://repository.jboss.org/nexus/content/groups/public
4、
nexus-aliyun
*
Nexus aliyun
http://maven.aliyun.com/nexus/content/groups/public
这四个都可以使用代码直接粘贴就可以了,楼主用的是第四个速度最快的。这个是阿里云的一个代理 其他的速度有点不能忍
其他相关网址:
http://blog.csdn.net/shycx/article/details/7726600
http://blog.csdn.net/xuefeng0707/article/details/42157311
http://blog.csdn.net/htqing/article/details/54890864
本博客转自:https://blog.csdn.net/u010974598/article/details/66742912