Jetty Maven Plugin

①Maven  settings.xml文件

<pluginGroups>
	<pluginGroup>org.mortbay.jetty</pluginGroup>
</pluginGroups>

②Maven 项目的pom.xml文件

<plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <configuration>
                    <webApp>
                        <contextPath>/</contextPath>
                    </webApp>
                    <stopKey>webx</stopKey>
                    <stopKey>9999</stopKey>
                    <connectors>
                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                            <port>8081</port>
                            <maxIdleTime>60000</maxIdleTime>
                        </connector>
                    </connectors>
                    <requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">
                        <filename>target/access.log</filename>
                        <retainDays>90</retainDays>
                        <append>false</append>
                        <extended>false</extended>
                        <logTimeZone>GMT+8:00</logTimeZone>
                    </requestLog>
                    <systemProperties>
                        <systemProperty>
                            <name>productionMode</name>
                            <value>${productionMode}</value>
                        </systemProperty>
                    </systemProperties>
                </configuration>
            </plugin>
mvn jetty:run

Configuring the Jetty Maven Plugin



你可能感兴趣的:(maven,jetty)