设为首页 收藏本站
查看: 969|回复: 0

[经验分享] 整合maven,jetty,jrebel进行debug调试

[复制链接]

尚未签到

发表于 2017-2-27 12:00:40 | 显示全部楼层 |阅读模式
整合maven,jetty,jrebel进行调试

maven配置
  这个网上有很多,验证mvn是否配置正确:
DSC0000.jpg


Jrebel配置


  • 解压至目录,不建议目录名有空格 ,破解包下载
  • 参考:

    • http://zeroturnaround.com/software/jrebel/features/frameworks/
    • http://truemylife.iteye.com/blog/1140921


  • 由于都在eclipse中运行就不配置系统环境变量了

jetty配置


  •   maven插件,pom.xml中插入



    <plugin>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>9.1.3.v20140225</version>
    <configuration>
    <useTestScope>true</useTestScope>
    <scanIntervalSeconds>0</scanIntervalSeconds>
    <useTestClasspath>true</useTestClasspath>
    <webApp>
    <!-- 从jetty的jar中拷贝出webdefault.xml 修改其中的参数 ,可以修改html,js -->
    <defaultsDescriptor>src/test/resources/jetty.xml</defaultsDescriptor>
    <contextPath>/${project.artifactId}</contextPath>
    <descriptor>${project.build.directory}/test-classes/web.xml</descriptor>
    </webApp>
    <testClassesDirectory>${project.build.testOutputDirectory}</testClassesDirectory>
    <stopKey>foo</stopKey>
    <stopPort>9999</stopPort>
    </configuration>
    </plugin>
  •   run configurations
    DSC0001.jpg DSC0002.jpg




    -noverify
    -javaagent:D:/software/jrebel/jrebel.jar
    -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar
    -Drebel.generate.show=true
    -Drebel.spring_plugin=true
    -Drebel.aspectj_plugin=true
    -Drebel.cxf_plugin=true
    -Drebel.logback_plugin=true
    -Drebel.mybatis_plugin=true
    -Xdebug  -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

开始调试


  •   点击上图中的run按钮



    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel: #############################################################
    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel:  JRebel 5.4.2 (201311271505)
    2014-03-17 20:28:55 JRebel:  (c) Copyright ZeroTurnaround OU, Estonia, Tartu.
    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel:  Over the last 30 days JRebel prevented
    2014-03-17 20:28:55 JRebel:  at least 2 redeploys/restarts saving you about 0.1 hours.
    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel:  Over the last 257 days JRebel prevented
    2014-03-17 20:28:55 JRebel:  at least 97 redeploys/restarts saving you about 3.9 hours.
    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel:  This product is licensed to www.sdandroid.com
    2014-03-17 20:28:55 JRebel:  for unlimited number of developer seats on site.
    2014-03-17 20:28:55 JRebel:   ####### Cracked by sdandroid (blog@sdandroid.com) ######
    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel:  The following plugins are disabled at the moment:
    2014-03-17 20:28:55 JRebel:  * Axis2 plugin (set -Drebel.axis2_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Camel plugin (set -Drebel.camel_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Click plugin (set -Drebel.click_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Deltaspike plugin (set -Drebel.deltaspike_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Eclipse RCP Plugin (set -Drebel.eclipse_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * JBoss7 EJB Plugin (set -Drebel.jboss7_ejb_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * JRuby Plugin (set -Drebel.jruby_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Jersey plugin (set -Drebel.jersey_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Log4j2 plugin (set -Drebel.log4j2_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Mustache Plugin (set -Drebel.mustache_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * RESTlet plugin (set -Drebel.restlet_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Seam-Wicket plugin (set -Drebel.seam_wicket_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Spring Data Plugin (set -Drebel.spring_data_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Thymeleaf Plugin (set -Drebel.thymeleaf_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * VRaptor plugin (set -Drebel.vraptor_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * Vaadin CDI utils plugin (set -Drebel.vaadin_cdiutils_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:  * WebObjects plugin (set -Drebel.webobjects_plugin=true to enable)
    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel: #############################################################
    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel:
    2014-03-17 20:28:55 JRebel: A newer version '5.5.1' is available for download
    2014-03-17 20:28:55 JRebel: from http://zeroturnaround.com/software/jrebel/download/
    2014-03-17 20:28:55 JRebel:
    Listening for transport dt_socket at address: 8787
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

当控制台开始打出如上的日志,说明你的项目正以jrebel的方式启动,并开启的debug端口为8787(如倒数第二行)
  此时的项目如同没开debug一样,不会进入断点
  2.添加远程调试
DSC0003.jpg

  单击debug按钮后,就可以自动进入断点了

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-347966-1-1.html 上篇帖子: 通过控制台生成maven项目,jetty启动web项目 下篇帖子: Maven+eclipse+jetty配置
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表