首页 > 其他 > 详细

How to add and configure jetty server in maven pom.xml

时间:2015-06-22 22:02:44      阅读:242      评论:0      收藏:0      [点我收藏+]

Jetty server configuration will be added as a maven plugin

<!--Jetty config-->
<build>
  <pluginManagement>
  <plugins> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>8.1.7.v20120910</version> <configuration> <webAppSourceDirectory>${project.build.directory}/[your proj name]</webAppSourceDirectory> <webApp> <!--You can put .properties file in configration folder other than resource folder--> <extraClasspath>${basedir}/configuration</extraClasspath> <contextPath>/[your proj name]</contextPath> <connectors> <!-- work around file locking on windows, this the app port --> <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"> <port>8098</port> </connector> </connectors> <systemProperties> <systemProperty> <name>log4j.config.location</name> <value>${basedir}/configuration</value> <systemProperty> </systemProperty> <name>app.install.root</name> <value>${basedir}</value> </systemProperty> <systemProperty> <name>org.apache.jasper.compiler.disablejsr199</name> <value>true</value> </systemProperty> </systemProperties> </configuration> </plugin> <!--other plugins--> </plugins>
   </pluginManagement>
</build>

With this configuration, you should be able to use mvn jetty:run to start jetty server.

How to add and configure jetty server in maven pom.xml

原文:http://www.cnblogs.com/sengao/p/4593886.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!