rinku
rinku

Reputation: 415

How to install jetty with eclipse on Mac

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.

Regards,

Upvotes: 5

Views: 7676

Answers (1)

Paul Dunnavant
Paul Dunnavant

Reputation: 616

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.

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.

Edit - Added more info about the jetty-maven-plugin:

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).

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.

Upvotes: 6

Related Questions