<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.4.v20170414</version>
<configuration>
<httpConnector>
<port>8081</port>
<host>localhost</host>
<idleTimeout>60</idleTimeout>
</httpConnector>
<stopKey>access-jetty</stopKey>
<stopPort>9011</stopPort>
<stopWait>10</stopWait>
<scanIntervalSeconds>1</scanIntervalSeconds>
<webAppSourceDirectory>src/main/webapp</webAppSourceDirectory>
<webApp>
<contextPath>/</contextPath>
</webApp>
<tempDirectory>${project.build.directory}/work</tempDirectory>
</configuration>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.4.v20170414</version>
<configuration>
<httpConnector>
<port>8081</port>
<host>localhost</host>
<idleTimeout>60</idleTimeout>
</httpConnector>
<stopKey>access-jetty</stopKey>
<stopPort>9011</stopPort>
<stopWait>10</stopWait>
<scanIntervalSeconds>1</scanIntervalSeconds>
<webAppSourceDirectory>src/main/webapp</webAppSourceDirectory>
<webApp>
<contextPath>/</contextPath>
</webApp>
<tempDirectory>${project.build.directory}/work</tempDirectory>
</configuration>
</plugin>
启动 jetty:run
停止 jetty:stop
参考:http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#get-up-and-running
本文介绍如何使用 Jetty Maven 插件配置并运行 Web 应用程序。包括设置 Jetty 版本、端口、主机名、超时时间等参数。通过 Maven 命令启动和停止 Jetty 服务器。
159

被折叠的 条评论
为什么被折叠?



