JRebel for Hybris ,Idea and Windows

时间:2022-02-04 04:36:17

参考:

Jrebel官网参考地址:https://manuals.zeroturnaround.com/jrebel/standalone/hybris.html

Wiki Hybris参考地址:https://help.hybris.com/6.2.0/hcd/8be5ab06866910149c83e0bd4a187fd8.html

1. 安装激活IntelliJ IDEA

https://blog.csdn.net/chinassj/article/details/80757549

2.  安装激活JRebel

https://blog.csdn.net/chinassj/article/details/81305021

3. 在../hybris/bin/platform/project.properties中配置修改这两个options

tomcat.javaoptions=-agentpath:"C:/Users/MACHENIKE/.IntelliJIdea2018.1/config/plugins/jr-ide-idea/lib/jrebel6/lib/jrebel64.dll"

tomcat.debugjavaoptions=-agentpath:"C:/Users/MACHENIKE/.IntelliJIdea2018.1/config/plugins/jr-ide-idea/lib/jrebel6/lib/jrebel64.dll" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n

JRebel for Hybris ,Idea and WindowsJRebel for Hybris ,Idea and Windows

tips:  C:/Users/MACHENIKE/.IntelliJIdea2018.1/config/plugins/jr-ide-idea/lib/jrebel6/lib/jrebel64.dll

以上这个路径换成你自己jrebel插件路径

4. 在hybris工程目录下(?/hybris/bin/ext-backoffice/backoffice/)打开buildcallbacks.xml(284行),修改一下includes的名字,任意都可以。(因为打开backoffice以后,如果再ant build时,这个jar包(webfragmentCore_XSSFilter.jar)将无法删除,会被占用。导致build失败。)

JRebel for Hybris ,Idea and WindowsJRebel for Hybris ,Idea and Windows

5.    使用

打开第一个命令行,启动服务(ant clean all && Hybrisserver.bat debug)

修改了代码以后,另起第二个命令行,原来的不关,运行 ant build

第二个命令行BUILD SUCCESSFUL之后,第一个命令行会出现:JRebel: Reloading class'xxxx'

JRebel for Hybris ,Idea and WindowsJRebel for Hybris ,Idea and Windows

补充:

需要打开JRebel for Hybris ,Idea and WindowsJRebel for Hybris ,Idea and Windows

勾要勾上