Migrating a webapp (Spring and Camel) from Tomcat 7 to Jetty
jetty, maven, spring, tomcat
Solution
This is what I did to make this work.
I Added the following plugin to my pom.xml
<!-- plugin so you can run mvn jetty:war-run -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.5.4.v20111024</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppConfig>
<contextPath>/mycontextpath</contextPath>
</webAppConfig>
<configuration>
<webApp>${basedir}/target/{mywarname}.war</webApp>
</configuration>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
Executed maven clean and install
$mvn clean install -DskipTests
Ran the war file using the Jetty plugin
$mvn jetty:war-run
In a separate window ran the tests
$mvn test
Problem
I've webapp that is currently deployed as a war to Tomcat7. I want migrate this webapp to Jetty. I explored Jetty but looks like there are too many options. The webapp uses Spring MVC and Camel. I'm using Maven to do builds, testing and deployment. I'm looking for good options to quickly migrate this app to Jetty. EDIT: My main interest is embedded Jetty. I'm assuming embedded Jetty should work fine with Spring. Thanks.