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.
Jetty/Feature/Jetty Maven Plugin
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/.
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.