Maven错误:在使用Nexus的当前项目中找不到用于前缀“原型"的插件 [英] Maven Error: No plugin found for prefix ‘archetype’ in the current project using Nexus

查看:302
本文介绍了Maven错误:在使用Nexus的当前项目中找不到用于前缀“原型"的插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在未直接连接到Internet的公司局域网中设置MAVEN.另外,我在中央存储库中使用了sonatype nexus.

I am trying to setup MAVEN in my company's local network which is not connected to the internet directly. Also I'm using sonatype nexus for my central repository.

运行命令mvn archetype:create时问题开始.结果始终是构建失败.

Problem starts when I run the command mvn archetype:create. The result is always build failure.

在当前项目中找不到找不到用于前缀原型"的插件.

error no plugin found for prefix 'archetype' in the current project.

我该如何解决这个问题?

How do I solve this issue?

推荐答案

Maven试图查找与原型"前缀相对应的完整插件工件ID.

Maven is trying to look up the full plugin artifact ID that corresponds the "archetype" prefix.

为此,它从以下路径中读取可用的前缀:/org/apache/maven/plugins/maven-metadata.xml

To do this it reads the available prefixes from this path: /org/apache/maven/plugins/maven-metadata.xml

由于您使用的是Nexus,因此很可能来自组存储库,例如:

Since you're using Nexus this is likely coming from a group repository, e.g.:

http://:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml

http://:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml

您需要仔细查看您的Maven配置和构建日志,以查看其确切尝试检索此信息的位置.如果您使用debug("-X")标志运行Maven,则可能会有关于失败的其他信息.

You'll need to look carefully at your maven configuration and your build log to see where exactly it is trying to retrieve this information. There will likely be additional information about the failure if you run Maven with the debug ("-X") flag.

如果它试图从Nexus实例中检索它,请参阅此处以获取有关如何诊断问题的信息:

If it's trying to retrieve it from your Nexus instance see here for information on how to diagnose the issue:

https://support.sonatype.com/entries/21437881

这篇关于Maven错误:在使用Nexus的当前项目中找不到用于前缀“原型"的插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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