Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
6.3.0.Beta2
-
None
-
-
NEW
-
NEW
Description
When loading a KieContainer from the classpath, my KieBase contains DRLs from the wrong package. It seems that the package names are incorrectly parsed.
See reproducer here: https://github.com/DuncanDoyle/drools-kmodule-packages-issue
Run mvn clean test to reproduce the problem
The reproducer has a kmodule.xml which defines a default KieBase that should contain the rule resources in the package "rules". The "src/main/resources" directory contains 3 folders, META-INF, rules and myrules. The latter 2 directories both contain a DRL file with a single rule. The name of this rule is the same in both DRLs.
When running the test (which actually doesn't do much other than loading a KieSession, inserting a fact, firing rules and dispose), the test fails with the message that there are duplicate rule names. This is caused by the fact that the DRLs in both folders are loaded into the KieBase instead of just the DRL in the rules folder (as defined in the kmodule.xml).
When you change the myrules folder name to mrulesj, the test succeeds.