Maven:无法检索插件描述符错误 [英] Maven: Failed to retrieve plugin descriptor error

查看:180
本文介绍了Maven:无法检索插件描述符错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我配置了Maven 3.0.3,并尝试通过以下命令使用原型下载示例项目:

I configured Maven 3.0.3 and tried to download a sample project using archetypes with this command:

mvn archetype:generate -DarchetypeGroupId=org.graniteds.archetypes 
                       -DarchetypeArtifactId=graniteds-tide-spring-jpa-hibernate 
                       -DgroupId=org.example 
                       -DartifactId=gdsspringflex 
                       -Dversion=1.0-SNAPSHOT

(来自此链接的命令: http://java. dzone.com/articles/enterprise-ria-spring-3-flex-4 )

(Command from this link : http://java.dzone.com/articles/enterprise-ria-spring-3-flex-4 )

我得到了这个错误:

Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom

[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1

Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom

[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1
.
.
.
Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml

[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (repo1.maven.org/maven2): Error transferring file: Connection refused: connect

[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (repo1.maven.org/maven2): Error transferring file: Connection refused: connect
Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml

[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (repo1.maven.org/maven2): Error transferring file: Connection refused: connect

[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (repo1.maven.org/maven2): Error transferring file: Connection refused: connect
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.479s
[INFO] Finished at: Tue Oct 18 12:44:58 BST 2011
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------

[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\krsl1254\.m2\repository), central (repo1.maven.org/maven2)] -> [Help 1]

我尝试搜索一些与此类似的帖子,但找不到答案.我尝试更改settings.xml中的代理设置,但仍然无法正常工作.你能帮我吗?

I tried searching some posts similar to this but couldn't get an answer. I tried changing proxy settings in settings.xml but it still doesn't work. Could you please help me out?

推荐答案

我有相同的错误.就我而言,我正在使用Netbeans 7.1.2,我之所以发布它是因为也许有人最终会和我一样.

I had the same error. In my case I am using Netbeans 7.1.2, I am posting this because maybe someone end up here same as I did.

我试图从GUI配置代理选项,但是文档说maven不读那些.因此,我在此处处检查了NetBeans常见问题解答:

I tried to configure the proxy options from the GUI, but the documentation says that maven doesn't read those. So I checked the NetBeans FAQ here :

主要要做的是在

user.home/.m2/settings.xml

如果没有,可以从

netbeans.home/java/maven/conf/settings.xml

然后取消注释(如果已有的话),否则只需填写此部分:

then uncomment if you already have it otherwise just fill this section:

<proxies>
 <proxy>
   <active>true</active>
   <host>myproxy.host.net</host>
   <port>80</port>
 </proxy>
</proxies>

您必须检查您的代理配置并在那里替换

you have to check your proxy configuration and replace it there

这篇关于Maven:无法检索插件描述符错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆