JRebel not listening or reloading changes in src/main/resources directory

mmm picture mmm · Aug 30, 2014 · Viewed 7.3k times · Source

JRebel not listening or reloading changes in src/main/resources directory making reading such files return cached and invalid value.

Is this normal?

Answer

Anton Arhipov picture Anton Arhipov · Aug 31, 2014

Make sure that the directory is listed in rebel.xml configuration file that is deployed with the app. If your rebel.xml was generated with JRebel plugin for Maven, then just make sure you specify that you want the resources directory to be included into the configuration:

<addResourcesDirToRebelXml>true</addResourcesDirToRebelXml>  

If you're using IntelliJ IDEA, and you don't see the changes applied to the resources, then you probably haven't configured the IDE to copy the files from resources directory to the target directory. Or mark the resources directory as "resources" directory (Right click on the folder in the project tree -> Mark directory as...)