8

我建立了一个新的 webapp Maven 项目,并想用 Jetty 的 Maven 插件对其进行测试。所以我发出了控制台命令:mvn jetty:run

在 Maven 的设置文件中定义后pluginGroup,我再次运行该命令。不幸的是,它失败了,因为我使用的是下面提到的插件版本之一:

为什么有 2 个基于 Maven 的插件来实现相同的目标 - 运行 Jetty?为什么他们要带来这么多的混乱?

或者请您向我解释它们之间的区别。

4

2 回答 2

14

使用 Jetty7,这个插件被重命名为 jetty-maven-plugin 以更好地符合 maven2 约定。Jetty 7 版本的插件在配置上也发生了实质性的变化。有关更多信息,请参阅 Jetty 7 Maven 插件功能指南。

在此处查看文档

于 2010-03-25T15:28:49.910 回答
7

The maven-jetty-plugin is for Jetty 6 and jetty-maven-plugin is for Jetty7 and later. The name change was made to "adhere with maven plugin naming conventions" and is part of the big mess created by the move of Jetty to the Eclipse Foundation. Actually, Jetty 7 is considered as a transition version (this must be the politically correct expression for big mess).

于 2010-03-25T15:52:12.950 回答