<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    大漠駝鈴

    置身浩瀚的沙漠,方向最為重要,希望此blog能向大漠駝鈴一樣,給我方向和指引。
    Java,Php,Shell,Python,服務器運維,大數據,SEO, 網站開發、運維,云服務技術支持,IM服務供應商, FreeSwitch搭建,技術支持等. 技術討論QQ群:428622099
    隨筆 - 238, 文章 - 3, 評論 - 117, 引用 - 0
    數據加載中……

    maven 中使用jetty原始文章

    Apache Wicket
    Maven Jetty plugin
    Added by Martin Funk, last edited by Adam Mathias Bittlingmayer on Jan 09, 2008  (view change)

    Using the Maven Jetty plugin

    This note is to describe the above plugin. which will run your web application in an embedded Jetty6 instance by just
    typing "mvn jetty:run" - No need to download or install Jetty manually, it's all automatic once the Maven project
    descriptor's set up (the pom.xml)

    Configuring HowTo

    Add the following to the <build><plugins> block of your projects pom.xml

    <plugin>



    <groupId>org.mortbay.jetty</groupId>



    <artifactId>maven-jetty-plugin</artifactId>



    </plugin>

    Running

    In order to run Jetty on a webapp project which is structured according to the usual Maven defaults, you don't need to configure anything.

    Simply type:

    mvn jetty:run

    Due to a bug in maven or the maven-jetty-plugin this only works if no jetty artifact is present in the dependencies section of the pom.xml file. This is the case for wicket-quickstart, wicket-examples and wicket-threadtest. So the tips given here can't be applied to those projects.

    Running the webapp in debug mode using Java Platform Debugger Architecture (JPDA)

    Using maven command line:

    I couldn't find a command line reference for maven2, but the one given for maven1 still aplies for the feature used here:

    First set MAVEN_OPTS environment variable with the following command:

    export MAVEN_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y'

    After setting this property, run "maven jetty:run" and it will block, waiting for a debug connection. If "suspend=n" is set, it will start right away.

    Using eclipse external tools:

    Running Eclipse Open "Run --> External Tools --> External Tools... --> Program". Press "New launch configuration". On the "Main" tab, fill in the "Location:" as the full path to your "mvn" executable. For the "Working Directory:" select the workspace that matches your webapp. For "Arguments:" add jetty:run.

    Move to the "Environment" tab and click the "New" button to add two new variables:

    name value
    MAVEN_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
    JAVA_HOME Path to your java executable

    As above the jvm will start right away when "suspend=n" is set.

    Attaching to the server running in debug mode, using eclipse:

    Running Eclipse Open "Run --> Debug... --> Remote Java Application". Press "New launch configuration". Fill in the dialog by selecting your webapp project for the "Project:" field, and ensure you are using the same port number as you specified in the address= property above.

    Now all you need to do is Run/Debug and select the name of the debug setup you setup above.

    This article is a gathering of information, credits need to be given to the authors of the pages behind the given links.


     Eclipse中用Maven來啟動Jetty調試Web應用

    1、先來配置一個外部工具,來運行JETTY:
     選擇菜單Run->External Tools->External Tools ...在左邊選擇Program,再點New:
     配置Location為mvn完整命令行。定位到bin下的mvn.bat
     選擇Working Directory為本項目。
     Arguments填寫:jetty:run
     再點選Enviroment頁:加入MAVEN_OPTS變量,值為:
     -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8080,server=y,suspend=y
     其中,如果suspend=n 表示不調試,直接運行。address=8080為端口
     然后,點APPLY,點擊Run啟動jetty
     
    2、調試應用
     點選run->debug...
     選中左樹中的Remote Java Application,再點New。
     選擇你的項目,關鍵是要填和之前設置外部工具時相同的端口號,其它都不變。
     
    注意:停止調試后,8080端口并沒有關閉,再運行run->debug后會報錯,具體原因沒有去深究。建議采用TcpView等工具關閉對應端口的進程

    posted on 2009-02-14 17:37 草原上的駱駝 閱讀(1301) 評論(0)  編輯  收藏 所屬分類: 項目管理

    主站蜘蛛池模板: 香蕉97超级碰碰碰免费公| 日韩亚洲一区二区三区| 亚洲AV无码成人精品区大在线| 国产亚洲一区二区手机在线观看| 亚洲国产理论片在线播放| 老外毛片免费视频播放| 亚洲人成免费网站| 国产国拍精品亚洲AV片| 亚洲日产乱码一二三区别| 久章草在线精品视频免费观看| 国产青草视频在线观看免费影院| 亚洲高清在线观看| 黑人粗长大战亚洲女2021国产精品成人免费视频 | 激情亚洲一区国产精品| japanese色国产在线看免费| 免费观看的毛片大全| 亚洲一卡二卡三卡| 色www永久免费视频| 国产亚洲精品影视在线| 精品一区二区三区免费毛片爱 | 又黄又爽一线毛片免费观看| 亚洲人成网站在线观看播放动漫| 国产精品久久永久免费| 亚洲成a人片在线观看日本| 无码A级毛片免费视频内谢| 亚洲人成色7777在线观看不卡| 亚洲色无码国产精品网站可下载| 人妻无码一区二区三区免费| 亚洲色大成网站WWW久久九九| 青娱乐在线免费观看视频| 91麻豆精品国产自产在线观看亚洲 | 亚洲人xxx日本人18| 国产成人福利免费视频| 国产AV旡码专区亚洲AV苍井空| 国产成人精品123区免费视频| 亚洲黄片手机免费观看| 亚洲黄色在线视频| 99精品国产免费久久久久久下载| 久久亚洲美女精品国产精品 | 亚洲an天堂an在线观看| 麻豆成人精品国产免费|