Java开发

Maven 添加Jetty

    <build>
        <finalName>springmvc</finalName>
        <plugins>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>8.1.8.v20121106</version>
                <configuration>
                    <reload>manual</reload>
                    <webAppConfig>
                        <contextPath>/${project.build.finalName}</contextPath>
                    </webAppConfig>
                    <connectors>
                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                            <port>9080</port>
                            <!--<maxIdleTime>60000</maxIdleTime>-->
                        </connector>
                    </connectors>
                </configuration>
            </plugin>
        </plugins>
    </build>   
在cmd 里面输入mvn jetty:run即可运行
posted @ 2015-02-28 10:03  King Bruce  阅读(278)  评论(0编辑  收藏  举报