1.修改项目pom.xml增加
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.5.v20120716</version>
<configuration>
<stopPort>9966</stopPort>
<stopKey>foo</stopKey>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>
<contextPath>/teff</contextPath>
</webApp>
</configuration>
</plugin>
2.执行mvn jetty:run-war -Djetty:port=9999,访问http://localhost:9999/teff/xxx
3.可以执行mvn jetty:stop停止jetty