Today I faced small confusion how to configure my Eclipse to use JRebel with Grails 3 framework. This is step by step configuration.
- Get ready with your eclipse on fedora 22 and gnome shell (I’m using sts-3.7.0.RELEASE);
- Install Gradle IDE Plugin;
- Install JRebel – it’s just a tool to autoreloading classes and spring beans ;-);
- Install Groovy 2.4 support from GitHub, (eclipse 4.5 Mars);
- Create your Grails 3 application
grails create-app hello-world --profile=web cd hello-world grails grails> create-controller homePage
- Import project into eclipse;
- Edit gradle.build file (to add JRebel compatibility), documentation at GitHub:
buildscript { repositories { ... mavenCentral() } dependencies { ... classpath group: 'org.zeroturnaround', name: 'gradle-jrebel-plugin', version: '1.1.2' } } ... apply plugin: 'rebel' ... build.dependsOn(generateRebel)
- Run “gradle generateRebel” -> generate rebel.xml file
During the next few days I will publish how to run Grails 3 with JRebel:
- From command line without JRebel
- From command line with JRebel
- From eclipse as a Spring Boot Application without JRebel
- From eclipse as a Spring Boot Application with JRebel