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

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.

时间: 2024-10-12 20:56:35

How to add and configure jetty server in maven pom.xml的相关文章

基于embedded jetty server的websocket开发

websocket提供一种在浏览器和服务器之间的全双工通信(full-duplex),替代了传统的轮询(polling)做法.目前,在一些web-base的富文本编辑器中有广泛的应用,例如Etherpad,石墨文档,有道云笔记等.具体的关于websocket的定义请参见:http://baike.baidu.com/view/3623887.htm 和 https://en.wikipedia.org/wiki/WebSocket.下文是一个基于embedded jetty server的web

How to configure samba server in Linux &nbsp; &nbsp; Print

Most Linux systems are the part of networks that also run Windows systems. Using Linux Samba servers, your Linux and Windows systems can share directories and printers. This is most use full situation where your clients are window native and you want

Configure Windows Server 2008 based DHCP database cleanup interval & lease grace period

My Windows Server 2008 based DHCP server related settings: 这里,LeaseExtension设置为10 minutes,意味着默认4个小时的grace period缩短到10分钟.DatabaseCleanupInterval默认为60 minutes,即默认每小时执行一次DHCP database cleanup. Configure Windows Server 2008 based DHCP database cleanup in

【C/S通信交互之Http篇】Cocos2dx(Client)使用Curl与Jetty(Server)实现手机网游Http通信框架(内含解决curl.h头文件找不到问题)

之前已经分享过一篇基于Cocos2dx与服务器使用Socket进行通信的框架,还不太熟悉的请移步到如下博文中: [C/S通信交互之Socket篇]Cocos2dx(Client)使用BSD Socket与Mina(Server)手机网游通信框架! 那么今天Himi来分享如何在cocos2dx中使用Http来访问Server端并且获取数据: 这里对于Server端,Himi选用,Jetty,对于Jetty不太熟悉的可以先自行baidu-google-是个servlet的容器.类似JSP. 什么是s

Configure NTP Server

Configure NTP Server for Time Sync. [1] Right-click [Start] button and open [run] and input [gpedit.msc] like follows. [2] Select [Administrative Templates] - [System] - [Windows Time Service] - [Time Providers] on the left pane, and Open [Enable Win

Add Microsoft SQL JDBC driver to Maven(转)

from:http://claude.betancourt.us/add-microsoft-sql-jdbc-driver-to-maven/ Add Microsoft SQL JDBC driver to Maven March 13, 2012 Framework / How-To / Tutorials Maven does not directly support some libraries, like Microsoft's SQL Server JDBC. This tutor

Java系列:Add Microsoft SQL JDBC driver to Maven

Maven does not directly support some libraries, like Microsoft's SQL Server JDBC. This tutorial will show you how to add an external dependency to your local Maven repository. It assumes you have already installed Maven. Download the JDBC driver for

Server Based Converter 基于XML的移动数据转换

红樱枫软件---手机灵活应用数据的又一利器 基于XML的数据转换服务器软件 北京红樱枫软件有限公司与日本总公司Antena House发布了基于XML应用的Server Based Converter(SBC)产品. 在迅速发展的通信行业中,移动通信成为最为重要的通信业务,而移动终端也因为中国移动通信的发展成为许多厂商关注的焦点.随着中国移动通信的发展,手机已经从单一功能发展到多重功能,从简单应用发展到智能应用.手机不仅需要能够实时的收发电子邮件,而且还需要能够下载和浏览各种文件.将来手机的发展

Eclipse add Tomcat 7 blank server name 【无法输入server name】

I was trying to add Tomcat 7 in my Eclipse in Ubuntu. When I click "Add new server" in Eclipse and select "Tomcat v7.0 Server", the field "Server Name" is blank and I cannot type in anything in that textbox as shown below: Wh