代码拉取完成,页面将自动刷新
<sample>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<httpConnector>
<port>8080</port>
<!--<host>localhost</host>-->
</httpConnector>
<scanIntervalSeconds>10</scanIntervalSeconds>
<contextXml>src/main/webapp/WEB-INF/application-context.xml</contextXml>
<webApp>
<contextPath>/</contextPath>
</webApp>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<!--<daemon>true</daemon>-->
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!--<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>9080</port>
</connector>
<connector implementation="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<port>9443</port>
<password>changeit</password>
</connector>
</connectors>-->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<!--<contextXml>src/main/webapp/WEB-INF/web.xml</contextXml>-->
<!--<webApp>
<contextPath>src/main/webapp/WEB-INF</contextPath>
</webApp>-->
<!--<contextPath>/testdemo</contextPath>
<webApp>${basedir}/target/testdemo.war</webApp>-->
<!--<webAppConfig>
<!–jetty插件启动后的访问路径: http://localhost:8080/testdemo–>
<contextPath>/</contextPath>
<tempDirectory>src/main/webapp</tempDirectory>
</webAppConfig>-->
<!--<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>9080</port>
</connector>
<connector implementation="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<port>9443</port>
<password>changeit</password>
</connector>
</connectors>-->
<!--<connector implementation="org.eclipse.jetty.server.bio.SocketConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>-->
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>80</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<!--<connector implementation="org.eclipse.jetty.server.ssl.SslSocketConnector">
<port>8443</port>
<password>changeit</password>
</connector>-->
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<stopKey>stop</stopKey>
<stopPort>9999</stopPort>
<scanIntervalSeconds>1</scanIntervalSeconds>
<!--<contextXml>src/main/resources/jetty.xml</contextXml>-->
<!--<webApp>
<contextPath>/</contextPath>
</webApp>-->
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>80</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
<!-- jetty插件 -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<!-- 添加这行<webDefaultXml>src/main/resources/jetty/webdefault.xml</webDefaultXml> -->
<!--可以边修改边访问-->
<!-- <webAppSourceDirectory>src/main/webapp</webAppSourceDirectory> -->
<scanIntervalSeconds>3</scanIntervalSeconds>
<contextPath>/</contextPath>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8088</port>
</connector>
</connectors>
<webApp>
<contextPath>/</contextPath>
</webApp>
</configuration>
</plugin>
<plugin>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
<webApp>
<contextPath>/</contextPath>
</webApp>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.1.6.v20100715</version>
<configuration>
<webApp>${basedir}/target/webmail</webApp>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppConfig>
<contextPath>/myproject</contextPath>
</webAppConfig>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<contextHandlers>
<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
<resourceBase>${project.parent.basedir}/myproject-static/src/main/webapp</resourceBase>
<contextPath>/myproject-static</contextPath>
</contextHandler>
</contextHandlers>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<!--<artifactId>jetty-maven-plugin</artifactId>-->
<artifactId>maven-jetty-plugin</artifactId>
<!--<version>7.1.6.v20100715</version>-->
<version>6.1.26</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
<webApp>${basedir}/src/main/webapp</webApp>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppConfig>
<contextPath>/src</contextPath>
</webAppConfig>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<contextHandlers>
<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
<resourceBase>/src/main/webapp</resourceBase>
<contextPath>/src</contextPath>
</contextHandler>
</contextHandlers>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.24</version>
<configuration>
<stopPort>9966</stopPort>
<stopKey>foo</stopKey>
<contextPath>/</contextPath>
<scanIntervalSeconds>3</scanIntervalSeconds>
<scanTargetPatterns>
<scanTargetPattern>
<directory>src/main/webapp/WEB-INF</directory>
<excludes>
<exclude>**/*.jsp</exclude>
</excludes>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</scanTargetPattern>
</scanTargetPatterns>
<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
<filename>target/yyyy_mm_dd.request.log</filename>
<retainDays>90</retainDays>
<append>true</append>
<extended>false</extended>
<logTimeZone>GMT</logTimeZone>
</requestLog>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
</sample>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。