Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CrafterCMS: Crafter Engine doesn't seem to notice changes in the /classes/groovy folder

Crafter Engine doesn’t seem to notice files changed in the /classes/groovy folder. When we modify a groovy file there, it takes a Tomcat restart for it to be used. Is this a known issue or by design?

/opt/crafter/master>grep -r /classes/groovy engine/
engine/src/main/resources/crafter/engine/services/main-services-context.xml:        <property name="groovyClassesPath" value="/classes/groovy"/>
like image 568
Michael Chen Avatar asked May 19 '17 15:05

Michael Chen


1 Answers

Groovy classes become part of the classloader, so normally changes on them are not picked up. The best way for the changes to be apply is to rebuild the site's context, which will delete the old classloader. To rebuild call the API /api/1/site/context/rebuild.json. The deployer can be configured also to call this API any time files under /classes/groovy are changed.

like image 116
Alfonso Vasquez Avatar answered Nov 04 '22 21:11

Alfonso Vasquez