“未找到前缀的插件”在Eclipse中出错 [英] "Plugin not found for prefix" error in Eclipse
问题描述
在Eclipse中,我导入了一个使用maven jetty插件的基于maven的项目。如果我从命令行运行 mvn jetty:run
,一切都可以正常运行。如果我在Eclipse中添加运行配置并尝试运行它,我会收到错误消息:
In Eclipse I imported a maven-based project which uses maven jetty plugin. If I run mvn jetty:run
from command line, everything works fine. If I add a run configuration in Eclipse and try to run it, I get the error message:
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/eugene/.m2/repository), central (http://repo1.maven.org/maven2)] -> [Help 1]
在Eclipe运行配置中,我使用:
In the Eclipe run configuration, I use:
- 基本目录:
$ {project_loc}
- 目标:
:运行
- Maven运行时:外部
[ Help1 ]页面。我在maven配置文件中没有pluginGroup设置,但是我在pom.xml中提到了jetty插件,所以我猜一切都应该是好的(特别是因为一切都在命令行中运行)。在执行jetty运行配置之前,我试图在Eclipse中运行Maven clean,但没有帮助。项目编译并通过所有测试,只有jetty:运行在Eclipse中不起作用。
I read the [Help1] page. I don't have pluginGroup settings in maven configuration files, but I have the jetty plugin mentioned in pom.xml, so I guess everything should be fine (especially because everything works in command-line). I tried to "Run as > Maven clean" in Eclipse before executing the jetty run configuration, but it didn't help. Project compiles and passes all tests, only jetty:run does not work in Eclipse.
请帮助,我是Eclipse& Maven新手感谢提前。
Please help, I'm an Eclipse & Maven newbie. Thanks in advance.
推荐答案
它也不适用于我的命令行。
It does not work for me from command-line either.
可以在 settings.xml
中添加以下内容后,检查它是否有效:记录了?
Can you check if it works after adding the following in settings.xml
as documented?
<pluginGroups>
<pluginGroup>org.mortbay.jetty</pluginGroup>
</pluginGroups>
另请注意,插件有两个不同版本 - 较旧的 maven jetty plugin 和较新的 jetty maven插件。
Also note that there are two different versions of the plugin - the older maven jetty plugin and the newer jetty maven plugin.
这篇关于“未找到前缀的插件”在Eclipse中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!