<build>
<finalName>Spring-solr</finalName>
<plugins>
<!-- jetty插件, 设定context path与spring profile -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<scanIntervalSeconds>3</scanIntervalSeconds>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8093</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
</webAppConfig>
<stopKey>solr</stopKey>
<stopPort>9090</stopPort>
</configuration>
</plugin>
</plugins>
</build>
原文:http://www.cnblogs.com/yaoyao66123/p/6102466.html