1

I have a dummy drools project I have been trying to get off the ground to use as the basis for any drools project we have. This project has two kmodule.xml files (one under src/main/resource/META-INF and the other under src/test/resources/META-INF). This way I can separate out my rules for testing versus production rules (as this also is used to test code under different rules).

What I notice is that the when I do 'mvn test', the kmodule.xml under src/main/resources is loaded under the same key as kmodule.xml from src/test/resources causing the tests to fail as the correct rule set is not found. Two questions:

  1. Is this configuration supported?
  2. If not, what is the best way I can achieve the same result.

Thanks.

  • Unless there's something particular that you're doing, that you have not explained in your question, you don't need a separate `kmodule.xml` to have rules which only exist during testing. You just need to put your test rule `.drl` files under `src/test/resources/rules`. – Steve Apr 07 '15 at 13:17

0 Answers0