gpt4 book ai didi

Maven:无法检索插件描述符错误

转载 作者:行者123 更新时间:2023-11-29 04:08:45 24 4
gpt4 key购买 nike

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

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)

我得到了这个错误:

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 中的代理设置,但它仍然不起作用。你能帮帮我吗?

最佳答案

我有同样的错误。在我的例子中,我使用的是 Netbeans 7.1.2,我发布这个是因为也许有人和我一样结束了。

我尝试从 GUI 配置代理选项,但文档说 Maven 不读取这些选项。所以我查看了 NetBeans 常见问题解答 here :

主要你要做的就是在

下创建(如果不存在的话)一个settings.xml
user.home/.m2/settings.xml

如果没有可以复制

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

然后取消注释,否则只需填写此部分:

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

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

关于Maven:无法检索插件描述符错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56486509/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com