maven run-jetty-run jrebel

maven加google的run-jetty-run插件 加上jrebel解决开发web项目重启问题


1.下载附件中jreble并解压到本地如

2:run-jetyy-run的eclispe在线下载
http://run-jetty-run.googlecode.com/svn/trunk/updatesite
选择RunJettyRun这样就行,还有一个RunJetyyRun1.3不用选
在maven的web工程上右击debug as -> Debug configuration...
新建一个jetty webapp
自己根据情况选择jetty的版本,现支持jetty6到8
Project port 选项自己看着办

3.安jrebel插件
http://update.zeroturnaround.com/update-site
安装时我只选择了第一个选项Jrebel for Eclilpse(3.3+)

4.选上面的Arguaments选项卡,这里是配置jvm参数的地方,在VM arguments处加上
-noverify
-javaagent:F:/jrebel.jar(根据自己的路径修改)

一切OK,点Debug运行
控制台信息 会有
[2013-06-19 14:08:47] JRebel 5.1.2 (201212171004)
[2013-06-19 14:08:47] (c) Copyright ZeroTurnaround OU, Estonia, Tartu.
[2013-06-19 14:08:47]
[2013-06-19 14:08:47] Over the last 30 days JRebel prevented
[2013-06-19 14:08:47] at least 36 redeploys/restarts saving you about 1.5 hours.
[2013-06-19 14:08:47]
[2013-06-19 14:08:47] Over the last 64 days JRebel prevented
[2013-06-19 14:08:47] at least 69 redeploys/restarts saving you about 2.8 hours.
[2013-06-19 14:08:47]
[2013-06-19 14:08:47] You are running with an evaluation license.
[2013-06-19 14:08:47] You have 31631 days until the license expires.
2013-06-19 14:08:47.790:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
ParentLoaderPriority enabled
Context path:/pic-web
ProjectClassLoader: entry=D:\workspace-sts\pic-web\target\classes
。。。。。。。。。。。。。。。。。。。。。等等
[2013-06-19 14:08:48] JRebel: Directory 'D:\workspace-sts\pic-web\target\classes' will be monitored for changes.
[2013-06-19 14:08:48] JRebel: Directory 'D:\workspace-sts\pic-web\target\m2e-wtp\web-resources' will be monitored for changes.
[2013-06-19 14:08:48] JRebel: Directory 'D:\workspace-sts\pic-web\src\main\webapp' will be monitored for changes.
[2013-06-19 14:08:48] JRebel: Directory 'D:\workspace-sts\pic-action\target\classes' will be monitored for changes.
[2013-06-19 14:08:48] JRebel: Directory 'D:\workspace-sts\pic-service\target\classes' will be monitored for changes.
[2013-06-19 14:08:48] JRebel: Directory 'D:\workspace-sts\pic-domain\target\classes' will be monitored for changes.
[2013-06-19 14:08:48] JRebel: Directory 'D:\workspace-sts\pic-util\target\classes' will be monitored for changes.
[2013-06-19 14:08:48] JRebel: Directory 'D:\workspace-sts\pic-sdk\target\classes' will be monitored for changes.
[2013-06-19 14:08:48] JRebel-Log4j: Monitoring Log4j configuration in 'file:/D:/workspace-sts/pic-web/target/classes/log4j.properties'.

这样就没问题
你会发现每个maven工程的src/main/resources会有rebel.xml文件,
大概就监视rebel.xml中这个目录下文件修改
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值