本文介绍了mvn archetype:generate不起作用-未找到前缀'archetype'的插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用现有的原型构建一个简单的项目.但是我无法运行mvn archetype:generate,因为它会不断告诉我以下信息

I want to build a simple project using a existing archetype. But I can't run mvn archetype:generate as it keeps telling me the following information

[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:\Documents and Settings\ccen\.m2\repository), central (ht
tp://repo1.maven.org/maven2)] -> [Help 1]

我使用的是MS Windows,在〜/.m2文件夹中未使用任何settings.xml,所有内容都是全新的.有人可以帮我弄清楚吗?

I was using MS Windows and didn't use any settings.xml in my ~/.m2 folder and all stuff is brand new. Could any one help me to figure it out?

推荐答案

可能出错的另一件事是您的计算机位于防火墙或代理之后,因此您的机器无法命中http://repo1.maven.org/maven2.尝试直接在浏览器或其他工具中访问此URL,以测试是否可以发出请求.

The other thing that could be going wrong is that your machine is behind a firewall or proxy so your box is not able to hit http://repo1.maven.org/maven2. Try accessing this URL directly in a browser or something to test if you are able to make the request.

这篇关于mvn archetype:generate不起作用-未找到前缀'archetype'的插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 17:01