`
5dprince
  • 浏览: 54140 次
  • 性别: Icon_minigender_1
  • 来自: 贵阳
文章分类
社区版块
存档分类
最新评论

eclipse maven jetty 实现热部署项目(转)

 
阅读更多

pom.xml文件中设置scanIntervalSeconds不为0,如下设置为3秒

 

<plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>8.1.13.v20130916</version>
    <configuration>
        <webAppConfig>
            <contextPath>${webapp.path}</contextPath>
            <defaultsDescriptor>webdefault.xml</defaultsDescriptor>
        </webAppConfig>
        <connectors>
            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                <port>${webapp.port}</port>
                <maxIdleTime>60000</maxIdleTime>
            </connector>
        </connectors>
        <reload>automatic</reload>
        <scanIntervalSeconds>3</scanIntervalSeconds>
        <stopPort>${webapp.stopPort}</stopPort>
        <stopKey>${webapp.stopKey}</stopKey>
        <!-- stopPort>${webapp.stopPort}</stopPort -->
        <systemProperties>
            <systemProperty>
                <name>org.mortbay.util.URI.charset</name>
                <value>UTF-8</value>
            </systemProperty>
        </systemProperties>
        <jvmArgs>-Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
            -Dfile.encoding=UTF-8</jvmArgs>
    </configuration>
    <executions>
        <execution>
            <id>start-jetty</id>
            <phase>pre-integration-test</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <scanIntervalSeconds>3</scanIntervalSeconds>
                <daemon>true</daemon>
            </configuration>
        </execution>
        <execution>
            <id>stop-jetty</id>
            <phase>post-integration-test</phase>
            <goals>
                <goal>stop</goal>
            </goals>
        </execution>
    </executions>
</plugin>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics