Search code examples
droolsoptaplanner

OptaPlanner ECJ dependency. Replace or pre-compile drools for on-prem installation


We have been using OptaPlanner for a potential On-Prem/Cloud solution. We are currently using drools-rules that are compiled at runtime (i think the default behaviour?).

OptaPlanner is pulling in the "Eclipse ECJ" dependency via the Drools compiler.

optaplanner-core -> drools-compiler -> ecj

ECJ uses the EPL 1.0 licence which we have been instructed should not be distributed.

My question(s):

  • Does OptaPlanner support pre-compiled drools rules?
  • Are there any alternatives if we were to exclude 'ecj'?

Solution

  • ConstraintStreams are probably a way to avoid ECJ, as the Drools implementation won't compile DRL. And the faster Bavet implementation won't use Drools at all. However, ConstraintStreams are still young... (but very actively being worked on).