整合maven,jetty,jrebel进行调试

maven配置

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

Jrebel配置

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

     

    -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

开始调试

  1. 点击上图中的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.添加远程调试

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

整合maven,jetty,jrebel进行debug调试的更多相关文章

  1. IDEA Maven Jetty Jrebel 热部署

    准备:1.下载Jrebel的离线安装包,版本是6.4.3版本.            2.下载Jrebel的破解补丁包,同样也是针对6.4.3版本的 Jrebel离线安装包官网下载地址:https:/ ...

  2. Mac 下 Intellij IDEA 2016.1.2+maven+jetty+ JRebel 6.4.3 破解+spring mvc

    准备阶段:  Intellij IDEA 2016.1.2 (官方下载,作者下载的是社区版): JRebel for IntelliJ插件安装,可选择在线安装,在线安装的是最新版,我选择本地安装, 下 ...

  3. maven项目debug调试不能够进入源码问题解决

    Maven项目在debug调试模式的时候,进入调试模式,但是没有进入源码界面. 上述问题的解决方法如下: 第一步: 第二步: 第三步: 第四步: 第五步: 到这里就解决了:

  4. maven的tomcat插件如何进行debug调试

    利用maven来部署工程时,一般采用的是tomcat插件,使项目在tomcat上面运行,那么这个debug调试是如何进行呢? 我们在调试的时候问题: 会提示找不到资源,那么如何进行修改呢,方法两个: ...

  5. (转)淘淘商城系列——maven工程debug调试

    http://blog.csdn.net/yerenyuan_pku/article/details/72784074 上文我们已经实现了商品列表展示的功能,在实际开发中我们肯定是要经常对maven工 ...

  6. 使用Eclipse+Maven+Jetty构建Java Web开发环境(几个教程综合集成2014发行)

    工作需要使用Jetty由于web集装箱,得知Eclipse+Maven+Jetty该组合是非常好的,因此,要在网上找了很多教程,但不写或多或少特定的或过时的内容而导致最终的配置失败,易于配置为未来的同 ...

  7. Intellij IDEA +MAVEN+Jetty实现SpringMVC简单查询功能

    利用 Intellij IDEA +MAVEN+Jetty实现SpringMVC读取数据库数据并显示在页面上的简单功能 1 新建maven项目,配置pom.xml <project xmlns= ...

  8. 【技术贴】第二篇 :解决使用maven jetty启动后无法加载修改过后的静态资源

    之前写过第一篇:[技术贴]解决使用maven jetty启动后无法加载修改过后的静态资源 一直用着挺舒服的,直到今天,出现了又不能修改静态js,jsp等资源的现象.很是苦闷. 经过调错处理之后,发现是 ...

  9. maven jetty plugin

    转载:http://blog.163.com/xueling1231989@126/blog/static/1026408072013101311395492/ 前言: 在 maven 下测试调试时, ...

随机推荐

  1. TOKEN+签名验证

    TOKEN+签名验证 首先问大家一个问题,你在写开放的API接口时是如何保证数据的安全性的?先来看看有哪些安全性问题在开放的api接口中,我们通过http Post或者Get方式请求服务器的时候,会面 ...

  2. 项目的敏捷开发方法(转自MBAlib)

    项目的敏捷开发方法 敏捷方法很多,包括 Scrum.极限编程.功能驱动开发以及统一过程(RUP)等多种法,这些方法本质实际上是一样的,敏捷开发小组主要的工作方式可以归纳为:作为一个整体工作: 按短迭代 ...

  3. hadoop 2.2.0 编译报错: [ERROR] class file for org.mortbay.component.AbstractLifeCycle not found

    [ERROR]  class file for org.mortbay.component.AbstractLifeCycle not found 错误堆栈如下: [ERROR] COMPILATIO ...

  4. Hadoop集群(第10期)_MySQL关系数据库

    1.MySQL安装 MySQL下载地址:http://www.mysql.com/downloads/ 1.1 Windows平台 1)准备软件 MySQL版本:mysql-5.5.21-win32. ...

  5. 试求由a,b,c三个字母组成的n位符号串中不出现aa图像的符号串的数目

    1.错误解法       共3^n,含aa的共3^(n-2),那么相减8*3^(n-2).       分析:aa的左右两边不能是a,所以结果肯定大了. 2.正确解法       假设符合条件的符合串 ...

  6. vs2012+cmake+opencv+opencv unable to find a build program corresponding to "Visual Studio 12 Win64". CMAKE_MAKE_PROGRAM is not set

    搜索了下,说什么的都有! 一,提示找不到 cmake-2.8.12.1 的 modles 卸载了cmake后发现 cmd 中的 cmake --version 还是 2.8.11.1 找到是我的cyg ...

  7. 汇编函数调用中bp和sp是指什么?

    bp为基址寄存器,一般在函数中用来保存进入函数时的sp的栈顶基址sp是栈顶指针,它每次指向栈顶.每次子函数调用时,系统在开始时都会保存这个两个指针并在函数结束时恢复sp和bp的值.像下面这样:在函数进 ...

  8. ZOJ 3817 Chinese Knot

    题意:给定4个长度为N的字符串( N <= 100000),然后构成一个“中国结”,给定目标串,问能否从某个节点出发走一遍得到目标串,其中不能连续通过3个中心节点,也就是从字符串一个端点转移到其 ...

  9. SPRING IN ACTION 第4版笔记-第五章BUILDING SPRING WEB APPLICATIONS-007-表单验证@Valid、Error

    一. Starting with Spring 3.0, Spring supports the Java Validation API in Spring MVC . No extra config ...

  10. GetActiveView 返回 NULL 为 MDI 框架窗口

    blog 在 MDI 应用程序中,MDI 主框架窗口(CMDIFrameWnd) 不具有与其相关联的视图.相反,每个单独的子窗口(CMDIChildWnd)具有与之关联的一个或多个视图.因此,对 MD ...