1 Star 0 Fork 0

Franklin杨/jetty-embedded-spring-mvc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sample.xml 9.93 KB
一键复制 编辑 原始数据 按行查看 历史
Franklin杨 提交于 8年前 . ...
<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>
&lt;!&ndash;jetty插件启动后的访问路径: http://localhost:8080/testdemo&ndash;&gt;
<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>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/franklinyang/jetty-embedded-spring-mvc.git
git@gitee.com:franklinyang/jetty-embedded-spring-mvc.git
franklinyang
jetty-embedded-spring-mvc
jetty-embedded-spring-mvc
master

搜索帮助