maven+jrebel+jetty 热部署

(注:图片是借的,懒得截图)
pom.xml
<plugins>
<!-- jetty插件, 设定端口与context path -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.0.1.v20091125</version>
<configuration>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
</webAppConfig>
<scanIntervalSeconds>0</scanIntervalSeconds>
</configuration>
</plugin>

</plugins>

web

jrebel安装

安装 JRebel Eclipse 插件eclipse

Help » Install New Softwaremaven

而后经过 以下 URL :
http://www.zeroturnaround.com/update-site/spa

若是要离线下载的话,能够经过下载离线包的方式进行:
插件

http://www.zeroturnaround.com/update-site/update-site.zip
xml

若是不使用默认的jrebel需指定其JAR包的路径 :

图片



配置 JReBel.xml

配置好后,就剩下加入jrebel的参数了。要在eclipse里加入jrebel参数,须要装jrebel for eclipse 插件,装好以后,对pom.xml点右键,选择run->run configurations,在弹出的对话框中选择标签jrebel,勾选enable jrebel agent

成了,运行试试ip