Jump to: navigation, search

Jetty/Howto/Use Jetty with Maven

< Jetty‎ | Howto
Some or all of this content remains to be ported to Jetty 9 Documentation.
If you are interested in migrating this content see our contribution guide or contact us.

Some very simple instructions that will let you execute the SimplestServer example from the Embedding Jetty tutorial.

In your pom enter the following.

   <!-- TODO 1 Pick the version of jetty you want. -->

   <!-- TODO 2 Configure repo2.maven.org as a repository. -->
   <!-- TODO 3 Set up dependency to get the jetty-server artifact. -->

If you want to run the OneServletContext example you'll also need access to ServletContextHandler and ServletHolder classes together with the HttpServlet and related classes. For this you can replace the dependency on jetty-server with a dependency on the jetty-servlet artifact.


See also the pages on the Jetty Maven Plugin.