在目标pom文件中添加:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.0.0</version>
<configuration>
<contextPath>/</contextPath>
<scanIntervalSeconds>300</scanIntervalSeconds>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8090</port>
</connector>
</connectors>
</configuration>
</plugin>
<!-- tomcat-maven-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<port>8090</port>
<path>/</path>
</configuration>
</plugin>