Skip to content
Ken Siprell edited this page May 17, 2015 · 2 revisions

Breaking Changes

If you are upgrading from version 0.9.x, there are some breaking changes you will have to address.

Rule File Directory

Rule files and subdirectories must be located under src/resources/. You can no longer use some arbitrary file system path. This change and the one discussed below were required to align the plugin with Drools conventions.

drlFileLocation

grails.plugin.drools.drlFileLocation must be a single directory name and not a path. For example, the default of "rules" refers to the following file system path: src/resources/rules/.

Classpath Access

Rule files are now available on the classpath using / instead of .. Older versions of the plugin violated the DRY principle by having the same rule file in two different locations. For example,

droolsService.executeFromFile("rules.ruleOne.drl", [facts])

becomes

droolsService.executeFromFile("rules/ruleOne.drl", [facts])

And

classLoader.getResourceAsStream("rules.ruleOne.drl")

becomes

classLoader.getResourceAsStream("rules/ruleOne.drl")

Rule File Names

Rule files must have a "drl" or "rule" suffix. This change avoids unnecessary clutter in the target directory by omitting hidden files and directories.