Maven Error: No plugin found for prefix ‘archetype’ in the current project using Nexus

只愿长相守 提交于 2019-12-11 03:38:24

问题


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.

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?


回答1:


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

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

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

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.

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



来源:https://stackoverflow.com/questions/24276527/maven-error-no-plugin-found-for-prefix-archetype-in-the-current-project-using

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!