让 Maven 启动 jetty(Tapestry 教程)

发布于 2024-07-26 19:03:49 字数 705 浏览 3 评论 0原文

我正在尝试完成 Tapestry 教程。

我想我已经把一切都设置好了,到目前为止一切都很好,但是我到达了部分< /a> 其中的言论相当流畅地指出:

更改为新创建的 目录,执行命令:

mvn jetty:run

再次,第一次,有一个 下载量令人眼花缭乱,但是 在您不知不觉中,Jetty servlet 容器已启动并正在运行。

我希望! 这只会导致以下错误。

插件 'org.apache.maven.plugins:maven-jetty-plugin' 不存在或没有有效版本 可以找到

我有 maven-2.2.0、Jetty-5.1.9

我做的唯一与教程所述不同的事情是我使用 archetype:generate 而不是 archetype:create 因为创建失败,并指出它已被弃用并建议生成

I'm trying to work through the Tapestry tutorial.

I think I got everything set up right and so far so good but I get to the part where the tut rather glibly states:

Change into the newly created
directory, and execute the command:

mvn jetty:run

Again, the first time, there's a
dizzying number of downloads, but
before you know it, the Jetty servlet
container is up and running.

I wish! that only results in the following error.

The plugin
'org.apache.maven.plugins:maven-jetty-plugin'
does not exist or no valid version
could be found

I have maven-2.2.0, Jetty-5.1.9

The only thing I did different to what the tutorial stated was I used archetype:generate instead of archetype:create as create failed and noted it was deprecated and suggested generate instead.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜巴黎 2024-08-02 19:03:49

这是由于您的 pom.xml 文件中缺少 maven-jetty-plugin :

在 pom 中添加以下依赖项:

<plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.0.1</version>
      </plugin>

现在 mvn clean install 然后 jetty run 它将工作

This is due to missing maven-jetty-plugin in your pom.xml file :

Add the following dependency in pom:

<plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.0.1</version>
      </plugin>

now mvn clean install and then jetty run it will work

梦晓ヶ微光ヅ倾城 2024-08-02 19:03:49

它找不到它,因为它不在 Maven 默认查找的默认 org.apache.maven.plugins 或 org.codehaus.mojo 位置中,以将前缀映射到artifactId。 您有两种选择,在 pom 中定义插件,或者在 settings.xml 中将 jetty 组添加为 pluginGroup

It can't find it because it's not in the default org.apache.maven.plugins or org.codehaus.mojo locations where Maven looks by default to map the prefix to an artifactId. You have two choices, define the plugin in your pom, or add the jetty group as a pluginGroup in your settings.xml

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文