jrebel 安装与使用

此文权属个人研究学习之用。资源皆来自网络。 
1.安装插件: 
eclipse marketplace 搜索 jrebel 
或help-> install new software, update site: http://www.zeroturnaround.com/update-site/ 

2.安装完后,提示invalid license. 关闭eclipse, 下载这个文件, 
http://pan.baidu.com/share/link?shareid=1494205938&uk=537696768解压覆盖至eclipse/plugins/org.zeroturnaround.eclipse.embedder_5.5.2.RELEASE-201403191032 下。 

3.重启eclipse. license已经生效了。 

4.在所需要项目中使用jrebel, 以下以maven项目作介绍: 
pom.xml plugins添加: 

Xml代码   收藏代码
  1. plugin>  
  2. <groupId>org.zeroturnaround</groupId>  
  3. <artifactId>jrebel-maven-plugin</artifactId>  
  4. <executions>  
  5. <execution>  
  6. <id>generate-rebel-xml</id>  
  7. <phase>process-resources</phase>  
  8. <goals>  
  9. <goal>generate</goal>  
  10. </goals>  
  11. </execution>  
  12. </executions>  
  13. <configuration>    
  14.         <rebelXmlDirectory>${basedir}/src/main/webapp/WEB-INF/classes</rebelXmlDirectory>    
  15.     </configuration>    
  16. </plugin>  



5.test/resources下添加rebel.xml,路径改为你自己项目对应的: 

Xml代码   收藏代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">  
  3.   
  4.     <classpath>  
  5.         <dir name="F:/studio/junows/jee/src/main/webapp/WEB-INF/classes">  
  6.         </dir>  
  7.     </classpath>  
  8.   
  9.     <web>  
  10.         <link target="/">  
  11.             <dir name="F:/studio/junows/jee/target/m2e-wtp/web-resources">  
  12.                 <exclude name="/"/>  
  13.             </dir>  
  14.         </link>  
  15.         <link target="/">  
  16.             <dir name="F:/studio/junows/jee/src/main/webapp">  
  17.             </dir>  
  18.         </link>  
  19.     </web>  
  20.   
  21. </application>  



添加jvm启动参数: 

Java代码   收藏代码
  1. ${jrebel_args}  
  2. -noverify -XX:PermSize=128M -XX:MaxPermSize=512M  
  3. -Drebel.log=d\:\\jrebel\\jrebel.log  
  4. -Xms512m -Xmx1024m  
  5. -Drebel.spring_plugin=true  



PS: 改properties\xml无效,这是要手动重启的。 

猜你喜欢

转载自heyichaos.iteye.com/blog/2215118