如何在Mac上使用Eclipse安装Jetty [英] How to install jetty with eclipse on Mac

查看:443
本文介绍了如何在Mac上使用Eclipse安装Jetty的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手.码头和RESTful API. 我想使用Jetty创建REST服务,并想在eclipse中使用嵌入式jetty. 谁能建议我任何在Mac OS中使用Eclipse安装Jetty/Jetty插件的方法.

I am a newbie w.r.t. jetty and RESTful API's. I want to create REST services using Jetty and wants to use embedded jetty with eclipse. Can anyone suggest me any HowTo for installing Jetty/ Jetty plugins with Eclipse in Mac OS.

此致

推荐答案

如果您正在寻找一个Eclipse插件,该插件将允许您通过Debug/Run菜单在Jetty中启动您的Web应用程序,则可能需要使用查看 run-jetty-run插件.

If you're looking for an Eclipse plugin that will allow you to start your web app in Jetty via the Debug/Run menus, you may want to take a look at the run-jetty-run plugin.

如果您碰巧正在使用Maven,则可以使用 Maven插件也可以在Jetty中启动您的应用.可以将其配置为通过Eclipse中的启动器运行,也可以通过命令行启动.

If you happen to be using Maven, there's a Maven plugin you can use to start your app in Jetty as well. This can be configured to run via a launcher in Eclipse or can be launched via the command line.

编辑-添加了有关jetty-maven-plugin的更多信息:

如果您只是在谈论本地开发,则不必单独下载Jetty以与Maven插件一起使用. Maven插件只需运行mvn jetty:run即可处理所需依赖项的下载.这将在Jetty(默认情况下)在 http://localhost:8080 上启动您的Web应用程序.如果使用此选项,那么实际上也不需要Eclipse插件.就版本而言,

If you're just talking about local development, then you don't have to download Jetty separately for use with the Maven plugin. The Maven plugin handles the download of the dependencies that you need by simply running mvn jetty:run. This will start your web app in Jetty (by default) at http://localhost:8080. If you use this, then there's really no need for the Eclipse plugin, either. As far as versions go, these are the available versions. I'd recommend sticking with a fairly recent version unless you have a need to use an older version of Jetty (it looks like the most recent version is a release candidate--8.0.0.RC0).

我刚刚发现的项目在Github上中还有一个用法示例,但您可能想要更新所使用的插件版本.

There's also an example of usage in a project on Github that I just found, but you may want to update the plugin version used.

这篇关于如何在Mac上使用Eclipse安装Jetty的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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