Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Jetty/Feature/Jetty Maven Plugin

< Jetty‎ | Feature
Revision as of 05:53, 10 August 2009 by Unnamed Poltroon (Talk) (New page: {{Jetty Feature | introduction = The Jetty Maven plugin is useful for rapid development and testing. It can be configured to periodically scan for changes and automatically redeploy the ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)



Introduction

The Jetty Maven plugin is useful for rapid development and testing. It can be configured to periodically scan for changes and automatically redeploy the webapp. This makes the development cycle more productive by eliminating the build and deploy steps: you use your IDE to make changes to the project, and the running web container will automatically pick them up, allowing you to test them straight away.

Feature

Quick Start

To run Jetty on a webapp project which is structured according to the usual Maven defaults, add jetty-maven-plugin to your pom.xml:

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

Then, in the same directory as your root pom.xml, simply type:

 mvn jetty:run

This will start Jetty and serve up your project on http://localhost:8080/.

Note.png

Jetty will continue to run until you stop it. While it runs, it will periodically scan for changes to your project files, so if you save changes and recompile your class files, Jetty will redeploy your webapp, and you can instantly test the changes you just made.

Stop it now by hitting CTRL-C.

Back to the top